Home   Help Search Login Register  

Author Topic: Please, someone help with script.  (Read 463 times)

0 Members and 1 Guest are viewing this topic.

kueter

  • Guest
Please, someone help with script.
« on: 14 Sep 2003, 04:02:45 »
Hiya all,  :)
         I need some help for my new sp mission, D vs. the Undead.  Problem is this -- I am having a hell of a time trying to figure out how to get the vampires to target the whole group instead of the leader.  ???
Here's script,  called by [vampire, hunter] exec "vampire.sqs"

_vampire =_this select 0;
_hunter =_this select 1;


#main
? NOT(alive _vampire) : goto "dead"
? NOT(alive _hunter) : goto "end"
_vampire domove (getpos _hunter)
? _vampire distance _hunter <= 5 : goto "attack"
? _vampire distance _hunter > 1 && _vampire distance _hunter <= 5 : goto "engage"
? _vampire distance _hunter > 5 : _vampire doMove getPos _hunter
~5
goto "main"

#engage
_nX = getPos _hunter select 0
_nY = getPos _hunter select 1
_vampire setPos [_nX, _nY]
goto "main"

#attack
? NOT(alive _vampire) : goto "dead"
_vampire switchmove "standstrokefist"
playsound "punch"
_x = random 2
? _x <= 1 : _hunter setDammage (getDammage _hunter + 0.1)
~1
goto "main"

#dead
playsound "growl"
exit

#end
exit

If someone would help, I would greatly appreciate it.  :D
peace,
Kueter

max_killer_payne

  • Guest
Re:Please, someone help with script.
« Reply #1 on: 15 Sep 2003, 19:46:26 »
Just knocked this 2gether 4 ya  ;D shud work okay
You'll probably have to call it differently though

Code: [Select]
_vampire =_this select 0;
_hunter =_this select 1;


#main
? NOT(alive _vampire) : goto "dead"
? NOT(alive _hunter) : goto "end"
_vampire domove (getpos _hunter)
? _vampire distance _hunter <= 5 : goto "attack"
? _vampire distance _hunter > 1 && _vampire distance _hunter <= 5 : goto "engage"
? _vampire distance _hunter > 5 : _vampire doMove getPos _hunter
~5
goto "main"

#engage
_rnd = (random 6)
?(_rnd < 1): goto "atk"
?(_rnd < 2): goto "atk2"
?(_rnd < 3): goto "atk3"
?(_rnd < 4): goto "atk4"
?(_rnd < 5): goto "atk5"
?(_rnd < 6): goto "atk6"
#atk
_vampire domove getpos _hunter (replace with name or whateva)
?(_vampire distance _hunter < 3) : goto "attack"
goto "engage"
#atk2
_vampire domove getpos _hunter (replace with name or whateva)
?(_vampire distance _hunter2 < 3) : goto "attack"
goto "engage"
#atk3
_vampire domove getpos _hunter (replace with name or whateva)
?(_vampire distance _hunter3 < 3) : goto "attack"
goto "engage"
#atk4
_vampire domove getpos _hunter (replace with name or whateva)
?(_vampire distance _hunter4 < 3) : goto "attack"
goto "engage"
#atk5
_vampire domove getpos _hunter (replace with name or whateva)
?(_vampire distance _hunter5 < 3) : goto "attack"
goto "engage"
#atk6
_vampire domove getpos _hunter (replace with name or whateva)
?(_vampire distance _hunter6 < 3) : goto "attack"
goto "engage"

#attack
? NOT(alive _vampire) : goto "dead"
_vampire switchmove "standstrokefist"
playsound "punch"
_x = random 2
? _x <= 1 : _hunter setDammage (getDammage _hunter + 0.1)
~1
goto "main"

#dead
playsound "growl"

#end
exit

kueter

  • Guest
Re:Please, someone help with script.
« Reply #2 on: 16 Sep 2003, 00:31:09 »
thanks max, I will give that a try.  :D