Author Topic: * script request * [tkc scp]  (Read 2979 times)

0 Members and 3 Guests are viewing this topic.

Doolittle

  • Online Villain
  • ***
  • Posts: 214
  • processInitCommands
    • View Profile
Re: * script request * [tkc scp]
« Reply #15 on: December 22, 2007, 10:28:28 am »
What missions do you like then?  You just mentioned every mission out there!
This post dedicated to MP ArmA cheaters, you warthog faced buffoons. Why do you have to ruin my enjoyment of the game, pigs? You scare away players, you miserable, vomitus masses.

MrChew

  • Guest
Re: * script request * [tkc scp]
« Reply #16 on: December 22, 2007, 11:17:30 am »

IllAssembly

  • Klass Klown
  • ***
  • Posts: 354
    • View Profile
Re: * script request * [tkc scp]
« Reply #17 on: December 22, 2007, 01:27:52 pm »
how exactly do u run godmode on an AI? i selected and then used my chinit godmode, but my bullets dropped the bloodsucker.

Easy_tiger

  • Klass Klown
  • ***
  • Posts: 331
  • ArmA Anti-Christ
    • View Profile
Re: * script request * [tkc scp]
« Reply #18 on: December 22, 2007, 04:11:52 pm »
Just replace 'player' with your select object name, it will need a new script

IllAssembly

  • Klass Klown
  • ***
  • Posts: 354
    • View Profile
Re: * script request * [tkc scp]
« Reply #19 on: December 24, 2007, 07:15:25 am »
Just replace 'player' with your select object name, it will need a new script

sorry, i dont understand



ok i get it i think do u mean make a copy of the godmode script, rename it, change player to "selected object", and add it to chinit? if so, what exactly is "selected object?"


heres is the select_object.sqs  script. please tell me what in here is "selected object" so i can place that into the new godmode file.

hint " .:: Scanning... ::.";
#again
? TKC_XlnISuH6DVEk80dC_stopmove == "jo":Exit
~0.25
_Xpos    = (getpos player select 0)+(sin (getdir player)*4)
_Ypos    = (getpos player select 1)+(cos (getdir player)*4)
_pos    = [_Xpos,_Ypos,getpos player select 2]

TKC_XlnISuH6DVEk80dC_tmp_obj    = nearestobject [_pos, ""]

? (TKC_XlnISuH6DVEk80dC_tmp_obj == player) : goto "again";

obj    = TKC_XlnISuH6DVEk80dC_tmp_obj;
TKC_XlnISuH6DVEk80dC_char_prozent    = "%";
TKC_XlnISuH6DVEk80dC_playername      = format["%1",name obj];
TKC_XlnISuH6DVEk80dC_type_of_obj     = typeof obj;
TKC_XlnISuH6DVEk80dC_health           = 100-((getdammage obj)*100);
TKC_XlnISuH6DVEk80dC_no_unit            = "Error: No uniXlnISuH6DVEk80dC_t";

player exec "\XlnISuH6DVEk80dC\scripts\target_object.sqs";

if(TKC_XlnISuH6DVEk80dC_playername == TKC_XlnISuH6DVEk80dC_no_unit) then { goto "no_unit" };

hint format ["  .:: Player Selected ::.\n---------------------------------\nName: %1\nType: %2\nHealth: %3%4", TKC_XlnISuH6DVEk80dC_playername, TKC_XlnISuH6DVEk80dC_type_of_obj, TKC_XlnISuH6DVEk80dC_health, TKC_XlnISuH6DVEk80dC_char_prozent];

exit

#no_unit
hint format ["  .:: Object Selected ::.\n---------------------------------\nType: %1\nHealth: %2%3", TKC_XlnISuH6DVEk80dC_type_of_obj, TKC_XlnISuH6DVEk80dC_health, TKC_XlnISuH6DVEk80dC_char_prozent];

Exit
« Last Edit: December 24, 2007, 07:25:26 am by hash »

Easy_tiger

  • Klass Klown
  • ***
  • Posts: 331
  • ArmA Anti-Christ
    • View Profile
Re: * script request * [tkc scp]
« Reply #20 on: December 24, 2007, 04:09:20 pm »
obj

IllAssembly

  • Klass Klown
  • ***
  • Posts: 354
    • View Profile
Re: * script request * [tkc scp]
« Reply #21 on: December 24, 2007, 06:17:17 pm »
ok sorry for looking like such a freakin retard, lol, but seriously just "obj" ? editing halo seemed to be easier for me. if its not just "obj" then please copy and paste what i need thanks tiger

heres why i say: below is godmode.sqs and then the ai godmode.sqs, which surely cant be right unless im wrong.

hint "Godmode ENABLED"

player addeventhandler ["hit",{player setdammage 0}]
player addeventhandler ["dammaged",{player setdammage 0}]
vehicle player addeventhandler ["hit",   {vehicle player setdammage 0}]
vehicle player addeventhandler ["dammaged",{vehicle player setdammage 0}]

Exit


--------------------------------------------------------------------------------------------

hint "AI Godmode ENABLED"

obj addeventhandler ["hit",{obj setdammage 0}]
obj addeventhandler ["dammaged",{obj setdammage 0}]
vehicle obj addeventhandler ["hit",   {vehicle obj setdammage 0}]
vehicle obj addeventhandler ["dammaged",{vehicle obj setdammage 0}]

Exit

ZOldDude

  • The Unknown Rank!
  • Administrator
  • MasstKer
  • *
  • Posts: 20874
  • Old School TKC
    • View Profile
    • Admin
Re: * script request * [tkc scp]
« Reply #22 on: December 24, 2007, 08:22:24 pm »
Not that it really matters given each persons own SPC settings and those posted ARE for basic "programming information"...but shouldn't this be in the lower level Arma Dev section?

*While we crash and burn, small, low tech, agrarian societies such as the Hmong in the mountains of Laos will continue on without so much as blinking an eye.*

IllAssembly

  • Klass Klown
  • ***
  • Posts: 354
    • View Profile
Re: * script request * [tkc scp]
« Reply #23 on: December 25, 2007, 10:37:15 am »
ok thanks that works but now how do i make multiple AIs invincible say 12- 18 ? after selecting the 1st and enabling godmode, when i select another obj it cancels the godmode for the first obj

« Last Edit: December 25, 2007, 12:24:26 pm by hash »

IllAssembly

  • Klass Klown
  • ***
  • Posts: 354
    • View Profile
Re: * script request * [tkc scp]
« Reply #24 on: December 27, 2007, 02:09:04 am »
sorry i couldnt help but bump this topic would it work if i made mulitiple TKC scripts like Xinushurh84ur.pbo and then another 4 and quadrupled my chinit list? so each selected "obj" is in reference to its own script??? u know? like run xurfgnrngi.pbo from tkcscp and then also sorgoeugvbeuov.pbo and hhihfiiirgvfe.pbo, with all the scripts included in each, then just run all 4?


or how can u run mulitple pbos through tkc, cus 1 at a time doesnt work.  :|   please respond soon



i want to make my first 24 recruits invincible, as easily and as fast as possible. ive tried swapping "player" in godmode.sqs with their classnames, but it does not work.
« Last Edit: December 27, 2007, 03:49:49 am by hash »

rogeruk

  • Online Villain
  • ***
  • Posts: 100
    • View Profile
Re: * script request * [tkc scp]
« Reply #25 on: December 27, 2007, 09:16:39 pm »
Are the AI in the map?. Or are you spawning them?.

Problem you got is that the eventhandler is getting assigned to that variable. If you re-assign it, the old godmode is taken off.

You could use..

Code: [Select]
_listunits = units player

_A = 1
_B = count _listunits
#LOOP
?_A == 1:goto "1"
?_A == 2:goto "2"
?_A == 3:goto "3"
?_A == 4:goto "4"
?_A == 5:goto "5"
?_A == 6:goto "6"

obj = _listunits select _A
obj addeventhandler ["hit",{obj setdammage 0}]
obj addeventhandler ["dammaged",{obj setdammage 0}]
vehicle obj addeventhandler ["hit",   {vehicle obj setdammage 0}]
vehicle obj addeventhandler ["dammaged",{vehicle obj setdammage 0}]
_A=_A+1
goto "pass"

#1
obj1 = _listunits select _A
obj1 addeventhandler ["hit",{obj1 setdammage 0}]
obj1 addeventhandler ["dammaged",{obj1 setdammage 0}]
vehicle obj1 addeventhandler ["hit",   {vehicle obj1 setdammage 0}]
vehicle obj1 addeventhandler ["dammaged",{vehicle obj1 setdammage 0}]
_A=_A+1
goto "pass"

#2
obj2 = _listunits select _A
obj2 addeventhandler ["hit",{obj2 setdammage 0}]
obj2 addeventhandler ["dammaged",{obj2 setdammage 0}]
vehicle obj2 addeventhandler ["hit",   {vehicle obj2 setdammage 0}]
vehicle obj2 addeventhandler ["dammaged",{vehicle obj2 setdammage 0}]
_A=_A+1
goto "pass"

#3
obj3 = _listunits select _A
obj3 addeventhandler ["hit",{obj3 setdammage 0}]
obj3 addeventhandler ["dammaged",{obj3 setdammage 0}]
vehicle obj3 addeventhandler ["hit",   {vehicle obj3 setdammage 0}]
vehicle obj3 addeventhandler ["dammaged",{vehicle obj3 setdammage 0}]
_A=_A+1
goto "pass"

#4
obj4 = _listunits select _A
obj4 addeventhandler ["hit",{obj4 setdammage 0}]
obj4 addeventhandler ["dammaged",{obj4 setdammage 0}]
vehicle obj4 addeventhandler ["hit",   {vehicle obj4 setdammage 0}]
vehicle obj4 addeventhandler ["dammaged",{vehicle obj4 setdammage 0}]
_A=_A+1
goto "pass"

#5
obj5 = _listunits select _A
obj5 addeventhandler ["hit",{obj5 setdammage 0}]
obj5 addeventhandler ["dammaged",{obj5 setdammage 0}]
vehicle obj5 addeventhandler ["hit",   {vehicle obj5 setdammage 0}]
vehicle obj5 addeventhandler ["dammaged",{vehicle obj5 setdammage 0}]
_A=_A+1
goto "pass"

#6
obj6 = _listunits select _A
obj6 addeventhandler ["hit",{obj6 setdammage 0}]
obj6 addeventhandler ["dammaged",{obj6 setdammage 0}]
vehicle obj6 addeventhandler ["hit",   {vehicle obj6 setdammage 0}]
vehicle obj6 addeventhandler ["dammaged",{vehicle obj6 setdammage 0}]
_A=_A+1
goto "pass"

#pass

~.5
?_B > _A:goto "LOOP"
exit

« Last Edit: December 27, 2007, 09:48:03 pm by rogeruk »

IllAssembly

  • Klass Klown
  • ***
  • Posts: 354
    • View Profile
Re: * script request * [tkc scp]
« Reply #26 on: December 28, 2007, 12:14:22 am »
wow :icon_confused2   you guys are like freaking gandalf. thanks a shit ton for conjuring up that little spell my fingers never would have typed that. and fuck the BIS forums

IllAssembly

  • Klass Klown
  • ***
  • Posts: 354
    • View Profile
Re: * script request * [tkc scp]
« Reply #27 on: December 28, 2007, 12:18:14 am »
am i just going to make that its own script or add that to select.sqs?     

rogeruk

  • Online Villain
  • ***
  • Posts: 100
    • View Profile
Re: * script request * [tkc scp]
« Reply #28 on: December 28, 2007, 01:34:49 am »
The script above i posted, "should" set godmode to 6 of your AI (not yrself)...

I know this may should wierd, but it will prob be your last 6.. Im not sure if your able to do it with less code in a for loop or with foreach.

Run it on its own.

IllAssembly

  • Klass Klown
  • ***
  • Posts: 354
    • View Profile
Re: * script request * [tkc scp]
« Reply #29 on: December 28, 2007, 06:13:21 am »
_listunits = units player

_A = 1
_B = count _listunits
#LOOP
?_A == 1:goto "1"
?_A == 2:goto "2"
?_A == 3:goto "3"
?_A == 4:goto "4"
?_A == 5:goto "5"
?_A == 6:goto "6"
?_A == 7:goto "7"
?_A == 8:goto "8"
?_A == 9:goto "9"
?_A == 10:goto "10"
?_A == 11:goto "11"
?_A == 12:goto "12"
?_A == 13:goto "13"
?_A == 14:goto "14"
obj = _listunits select _A
obj addeventhandler ["hit",{obj setdammage 0}]
obj addeventhandler ["dammaged",{obj setdammage 0}]
vehicle obj addeventhandler ["hit",   {vehicle obj setdammage 0}]
vehicle obj addeventhandler ["dammaged",{vehicle obj setdammage 0}]
_A=_A+1
goto "pass"

#1
obj1 = _listunits select _A
obj1 addeventhandler ["hit",{obj1 setdammage 0}]
obj1 addeventhandler ["dammaged",{obj1 setdammage 0}]
vehicle obj1 addeventhandler ["hit",   {vehicle obj1 setdammage 0}]
vehicle obj1 addeventhandler ["dammaged",{vehicle obj1 setdammage 0}]
_A=_A+1
goto "pass"

#2
obj2 = _listunits select _A
obj2 addeventhandler ["hit",{obj2 setdammage 0}]
obj2 addeventhandler ["dammaged",{obj2 setdammage 0}]
vehicle obj2 addeventhandler ["hit",   {vehicle obj2 setdammage 0}]
vehicle obj2 addeventhandler ["dammaged",{vehicle obj2 setdammage 0}]
_A=_A+1
goto "pass"

#3
obj3 = _listunits select _A
obj3 addeventhandler ["hit",{obj3 setdammage 0}]
obj3 addeventhandler ["dammaged",{obj3 setdammage 0}]
vehicle obj3 addeventhandler ["hit",   {vehicle obj3 setdammage 0}]
vehicle obj3 addeventhandler ["dammaged",{vehicle obj3 setdammage 0}]
_A=_A+1
goto "pass"

#4
obj4 = _listunits select _A
obj4 addeventhandler ["hit",{obj4 setdammage 0}]
obj4 addeventhandler ["dammaged",{obj4 setdammage 0}]
vehicle obj4 addeventhandler ["hit",   {vehicle obj4 setdammage 0}]
vehicle obj4 addeventhandler ["dammaged",{vehicle obj4 setdammage 0}]
_A=_A+1
goto "pass"

#5
obj5 = _listunits select _A
obj5 addeventhandler ["hit",{obj5 setdammage 0}]
obj5 addeventhandler ["dammaged",{obj5 setdammage 0}]
vehicle obj5 addeventhandler ["hit",   {vehicle obj5 setdammage 0}]
vehicle obj5 addeventhandler ["dammaged",{vehicle obj5 setdammage 0}]
_A=_A+1
goto "pass"

#6
obj6 = _listunits select _A
obj6 addeventhandler ["hit",{obj6 setdammage 0}]
obj6 addeventhandler ["dammaged",{obj6 setdammage 0}]
vehicle obj6 addeventhandler ["hit",   {vehicle obj6 setdammage 0}]
vehicle obj6 addeventhandler ["dammaged",{vehicle obj6 setdammage 0}]
_A=_A+1
goto "pass"

#7
obj7 = _listunits select _A
obj7 addeventhandler ["hit",{obj7 setdammage 0}]
obj7 addeventhandler ["dammaged",{obj7 setdammage 0}]
vehicle obj7 addeventhandler ["hit",   {vehicle obj7 setdammage 0}]
vehicle obj7 addeventhandler ["dammaged",{vehicle obj7 setdammage 0}]
_A=_A+1
goto "pass"

#8
obj8 = _listunits select _A
obj8 addeventhandler ["hit",{obj8 setdammage 0}]
obj8 addeventhandler ["dammaged",{obj8 setdammage 0}]
vehicle obj8 addeventhandler ["hit",   {vehicle obj8 setdammage 0}]
vehicle obj8 addeventhandler ["dammaged",{vehicle obj8 setdammage 0}]
_A=_A+1
goto "pass"

#9
obj9 = _listunits select _A
obj9 addeventhandler ["hit",{obj9 setdammage 0}]
obj9 addeventhandler ["dammaged",{obj9 setdammage 0}]
vehicle obj9 addeventhandler ["hit",   {vehicle obj9 setdammage 0}]
vehicle obj9 addeventhandler ["dammaged",{vehicle obj9 setdammage 0}]
_A=_A+1
goto "pass"

#10
obj10 = _listunits select _A
obj10 addeventhandler ["hit",{obj10 setdammage 0}]
obj10 addeventhandler ["dammaged",{obj10 setdammage 0}]
vehicle obj10 addeventhandler ["hit",   {vehicle obj10 setdammage 0}]
vehicle obj10 addeventhandler ["dammaged",{vehicle obj10 setdammage 0}]
_A=_A+1
goto "pass"

#11
obj11 = _listunits select _A
obj11 addeventhandler ["hit",{obj11 setdammage 0}]
obj11 addeventhandler ["dammaged",{obj11 setdammage 0}]
vehicle obj11 addeventhandler ["hit",   {vehicle obj11 setdammage 0}]
vehicle obj11 addeventhandler ["dammaged",{vehicle obj11 setdammage 0}]
_A=_A+1
goto "pass"

#12
obj12 = _listunits select _A
obj12 addeventhandler ["hit",{obj12 setdammage 0}]
obj12 addeventhandler ["dammaged",{obj12 setdammage 0}]
vehicle obj12 addeventhandler ["hit",   {vehicle obj12 setdammage 0}]
vehicle obj12 addeventhandler ["dammaged",{vehicle obj12 setdammage 0}]
_A=_A+1
goto "pass"

#13
obj13 = _listunits select _A
obj13 addeventhandler ["hit",{obj13 setdammage 0}]
obj13 addeventhandler ["dammaged",{obj13 setdammage 0}]
vehicle obj13 addeventhandler ["hit",   {vehicle obj13 setdammage 0}]
vehicle obj13 addeventhandler ["dammaged",{vehicle obj13 setdammage 0}]
_A=_A+1
goto "pass"

#14
obj14 = _listunits select _A
obj14 addeventhandler ["hit",{obj14 setdammage 0}]
obj14 addeventhandler ["dammaged",{obj14 setdammage 0}]
vehicle obj14 addeventhandler ["hit",   {vehicle obj14 setdammage 0}]
vehicle obj14 addeventhandler ["dammaged",{vehicle obj14 setdammage 0}]
_A=_A+1
goto "pass"


#pass

~.5
?_B > _A:goto "LOOP"
exit





will that then work for 14?