Home   Help Search Login Register  

Author Topic: wun wabbit, wun wabbit, wun wun wun  (Read 580 times)

0 Members and 1 Guest are viewing this topic.

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
wun wabbit, wun wabbit, wun wun wun
« on: 22 Jul 2003, 14:02:41 »
 :D

basically.... ive checked out scripts in the ed depot, but none actually do what i want... well, they do... but they do too much... i need a v simple script which does:

i have a guy who bails from a plane.... lands in enemy area and 4 search groups are sent out to get him (enemy).

now all i need is a small script that constantly updates the groups to the players location and makes them go there... so basically following him - and at full speed if possible please  ;)

thanx for any help in advance :thumbsup:
« Last Edit: 22 Jul 2003, 17:54:46 by Messiah »
Proud Member of the Volunteer Commando Battalion

max_killer_payne

  • Guest
Re:run rabbit, run rabbit, run run run
« Reply #1 on: 22 Jul 2003, 14:39:17 »
Here use this. It makes units hunt down other units. Pretty effective too. Made by some geeza called Baron Hurliothumb or somethin like that.

cya  ;)

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:run rabbit, run rabbit, run run run
« Reply #2 on: 22 Jul 2003, 17:54:23 »
ok... i modified it a bit and added it so i can call 4 squads at once.... but i never see them... no errors come up or anything... is what i'vve done ok?

Code: [Select]
;made by Baron Hurlothrumbo IIX
; if you want to have an AI unit (tank, infantry, whatever) hunt down
;and kill whoever set off a trigger, then set up the trigger so that the
;unit you want hunted will set it off.  Then in the on activation line put
;the line below, using <thislist select 0> for the unit to be hunted down.
;syntax
;[<name of unit to hunt down other unit>, <name of unit to be hunted down>] exec "hunterkiller.sqs"
;example
; [aTank, thislist select 0] exec "hunterkiller.sqs"

_killer = _this select 0
_killer = _this select 1
_killer = _this select 2
_killer = _this select 3
_KG = group _killer
_hunted = _this select 4
_KG SetCombatmode "RED"
_KG SetSpeedMode "FULL"


#loop
"_x domove (getpos _hunted)" foreach units _kg
"_x doTarget _hunted" foreach units _KG
~60

;waits 60 seconds before updating- change time if you want but bear
;in mind if it updates too fast AI will be swamped with move commands

?alive _hunted: goto "loop"
;checks if the target is alive, if so goes looking for him, if not exits script.

exit
Proud Member of the Volunteer Commando Battalion

max_killer_payne

  • Guest
Re:wun wabbit, wun wabbit, wun wun wun
« Reply #3 on: 22 Jul 2003, 19:04:12 »
No, from what i can see looks fine. Should work.

Offline KTottE

  • Former Staff
  • ****
Re:wun wabbit, wun wabbit, wun wun wun
« Reply #4 on: 22 Jul 2003, 19:09:22 »
Well what happens is you overwrite the _killer variable with the last value, so unless you turn _killer into an array that won't work at all :)
h/o and let me check the ed depot

edit

Fack, forget the array, just do a separate loop for each group, and do:

_killer1 = _this select 0
_KG1 = group _killer1

#loop

blah blah
« Last Edit: 22 Jul 2003, 19:44:01 by KTottE »
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

Captain Winters

  • Guest
Re:wun wabbit, wun wabbit, wun wun wun
« Reply #5 on: 23 Jul 2003, 01:59:00 »
why not just use:

_unit = _this select 0
_group = _this select 1

#loop
_group doMove getPos _unit
goto "loop"

Why not?

Tanks! 8)