Home   Help Search Login Register  

Author Topic: Spawn and Join script  (Read 623 times)

0 Members and 1 Guest are viewing this topic.

marcus3

  • Guest
Spawn and Join script
« on: 29 Nov 2005, 15:05:09 »
ok i have made this little script, it will be exec'd when a town is taken over, its supposed to make the unit apper and then move to the town

Code: [Select]

_town = _this select 1

_x = (getpos _town select 0) + 30
_y = (getpos _town select 1) + 0
_z = getpos _town select 2

_townset = [_x,_y,_z]

_bob = "OfficerGHG" createUnit [getmarkerPos "bar",fakegrp]

~0.002

[_bob] join grpnull


_bla = group _leader

_men = 0

#top

?(_men >= 6) : goto "moveout"

_man1 = "SoldierGB" createUnit [getmarkerPos "bar",fakegrp]

_men = _men +1

[_man1] join grpnull

[_man1] join _bob

~1

goto "top"


#moveout


_lead domove getpos _townset

exit

ok, the untis all get made, but then they jst move to the Game Logic called, fakegrp. i have no idea why its not working, but it getting annoying, so, help?
thanks  :-\

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Spawn and Join script
« Reply #1 on: 29 Nov 2005, 15:19:14 »
Quote
_lead domove getpos _townset
may be the problem.    _townset is already a position, you don't need getpos.   And _lead is undefined.    

You define _bla then don't use it.

You mention a gamelogic but it doesn't appear to come into the script.  If it exists, it should have a different name from the group fakegroup, otherwise you will get a variable conflict.

Plenty of reviewed ArmA missions for you to play

marcus3

  • Guest
Re:Spawn and Join script
« Reply #2 on: 30 Nov 2005, 00:07:37 »
nvm, thanks guys  :)