Home   Help Search Login Register  

Author Topic: Slight Script proplem  (Read 1226 times)

0 Members and 1 Guest are viewing this topic.

Offline D.murphy man

  • Members
  • *
  • I'm a llama!
Slight Script proplem
« on: 19 Feb 2003, 13:03:04 »
Hey all,

I seem to have a slight scripting proplem witch maybe some of you 'scripting gurus' could help me with.
Code: [Select]
_zombies = _this select 0
_i=count _zombies
{removeAllWeapons _x;_x addWeapon "StrokeFist"} forEach _zombies

#main
~0.25
_i=_i-1
_zombie=_zombies select _i
_target = nearestObject [_zombie, "SoldierWCrew"]
? _zombie distance _target <= 1 : _zombie addMagazine "StrokeFist"; goto "attack"
? _zombie distance _target > 1 && _zombie distance _target <= 5 : goto "engage"
? _zombie distance _target > 5 : _zombie move getPos _target
#back
?_i==0:_i=count _zombies
goto "main"

#engage
_nX = getPos _target select 0
_nY = getPos _target select 1
_zombie setPos [_nX, _nY]
goto "back"

#attack
_zombie fire "StrokeFist"
_x = random 2
? _x <= 1 : _target setDammage (getDammage _target + 0.1)
~1
_zombie removeMagazines "StrokeFist"
goto "back"

Right now for the proplem,this script works fine part from one thing.Im planning to use it in a MP mission but if i put more then one "soldier crew" down all the 'zombies' go after one soldier at a time insted of getting the closes one or jus stand there and dont go after u at all ???So id be VERY greatful if any one can help plzz.

P.S.If u want to know what im planning to do PM me or if u would like to help me on this mission plzzzz PM i need help as im not that good at the scripting stuff :( thnx.

If u cant PM on this forum (coz i cant remember if u can or not) E mail me at Dmurphyman@hotmail.com
« Last Edit: 19 Feb 2003, 13:07:34 by D.murphy man »