Home   Help Search Login Register  

Author Topic: Zombies won't attack in my MP mission  (Read 2018 times)

0 Members and 1 Guest are viewing this topic.

Offline robertoHrvat

  • Members
  • *
    • Area 51 modification
Zombies won't attack in my MP mission
« on: 09 Jul 2011, 12:35:27 »
Hi all, I have created my own multiplayer zombie mission. I created and spawn zombies script, and I have created game logic with init: gblAllTargets = [blah,blah,blah...], when i put zombies on map, they attacking me and my squad. But when I use a spawn zombies.sqs script that spawned zombies won't attacking, can anybody help me please.

(Spawn Zombies.sqs)
#Go

_x = random 2
?(_x<1): goto "next1"
?(_x<2): goto "next2"

#next1
_z = _this select 0
_location = _this select 0

~0 + random 2
"ZombieEx1" CreateUnit [getpos _location,_location,"Z1=this; [Z1] exec {\zombiescripts\initmalezombie.sqs}"]
~0 + random 2
"ZombieEx5" CreateUnit [getpos _location,_location,"Z2=this; [Z2] exec {\zombiescripts\initmalezombie.sqs}"]
~0 + random 2
"ZombieExWoman2" CreateUnit [getpos _location,_location,"Z3=this; [Z3] exec {\zombiescripts\initfemalezombie.sqs}"]
~0 + random 2
"ZombieExWoman5" CreateUnit [getpos _location,_location,"Z4=this; [Z4] exec {\zombiescripts\initfemalezombie.sqs}"]
~0 + random 2
"ZombieEx4" CreateUnit [getpos _location,_location,"Z5=this; [Z5] exec {\zombiescripts\initmalezombie.sqs}"]
~0 + random 2
"ZombieExWoman6" CreateUnit [getpos _location,_location,"Z6=this; [Z6] exec {\zombiescripts\initmalezombie.sqs}"]
~0 + random 2
"ZombieEx10" CreateUnit [getpos _location,_location,"Z7=this; [Z7] exec {\zombiescripts\initmalezombie.sqs}"]
~0 + random 2
"ZombieExWoman1" CreateUnit [getpos _location,_location,"Z8=this; [Z8] exec {\zombiescripts\initfemalezombie.sqs}"]
~0 + random 2
"ZombieExWoman3" CreateUnit [getpos _location,_location,"Z9=this; [Z9] exec {\zombiescripts\initfemalezombie.sqs}"]
~0 + random 2
"ZombieEx9" CreateUnit [getpos _location,_location,"Z10=this; [Z10] exec {\zombiescripts\initmalezombie.sqs}"]
~75
goto "Go"


#next2
_z = _this select 0
_location = _this select 0

~0 + random 2
"ZombieEx11" CreateUnit [getpos _location,_location,"Z11=this; [Z11] exec {\zombiescripts\initmalezombie.sqs}"]
~0 + random 2
"ZombieExWoman6" CreateUnit [getpos _location,_location,"Z12=this; [Z12] exec {\zombiescripts\initfemalezombie.sqs}"]
~0 + random 2
"ZombieExWoman1" CreateUnit [getpos _location,_location,"Z13=this; [Z13] exec {\zombiescripts\initfemalezombie.sqs}"]
~0 + random 2
"ZombieEx8" CreateUnit [getpos _location,_location,"Z14=this; [Z14] exec {\zombiescripts\initmalezombie.sqs}"]
~0 + random 2
"ZombieEx1" CreateUnit [getpos _location,_location,"Z15=this; [Z15] exec {\zombiescripts\initmalezombie.sqs}"]
~0 + random 2
"ZombieExWoman2" CreateUnit [getpos _location,_location,"Z16=this; [Z16] exec {\zombiescripts\initfemalezombie.sqs}"]
~0 + random 2
"ZombieEx11" CreateUnit [getpos _location,_location,"Z17=this; [Z17] exec {\zombiescripts\initmalezombie.sqs}"]
~0 + random 2
"ZombieExWoman4" CreateUnit [getpos _location,_location,"Z18=this; [Z8] exec {\zombiescripts\initfemalezombie.sqs}"]
~0 + random 2
"ZombieEx3" CreateUnit [getpos _location,_location,"Z19=this; [Z19] exec {\zombiescripts\initmalezombie.sqs}"]
~0 + random 2
"ZombieEx5" CreateUnit [getpos _location,_location,"Z20=this; [Z20] exec {\zombiescripts\initmalezombie.sqs}"]
~75
goto "Go"

#exit
exit


thx.
« Last Edit: 09 Jul 2011, 12:41:40 by robertoHrvat »
RobertoHrvat

Walter_E_Kurtz

  • Guest
Re: Zombies won't attack in my MP mission
« Reply #1 on: 09 Jul 2011, 15:49:44 »
Quote
#next1
_z = _this select 0
_location = _this select 0


~0 + random 2
"ZombieEx1" CreateUnit [getpos _location,_location,"Z1=this; [Z1] exec {\zombiescripts\initmalezombie.sqs}"]

1. I'm not sure what information you are sending to the script, but _z and _location end up with the same definition.

2. According to the syntax of createUnit, instead of an existing group for the new zombie to join you have _location.