Jump to content

Recommended Posts

_casSpawn = "B_RangeMaster_F" createUnit [_casPos, _casGroup];

So i have got the range master to spawn to the group civilian, I need to be able to use setDamage but i have nothing to assign the spawned range master to, there is no variable for the spawned ai, so I need your help to set damage and get a variable so I can also use other scripts on the spawned range master.

 

felipe.

Share this post


Link to post
Share on other sites

Do not use this syntax if you want to earn variable.

Use this instead:

_casSpawn = _casGroup createUnit ["B_RangeMaster_F",_casPos,[],0,"NONE"];

You can now damage him using the variable _casSpawn.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
40 minutes ago, felipechapmanfromm said:

also how would i set it so when the ai spawn in water, they dont start at the bottom and drown

Use setPosASL:

_spawnPos set [2,0.1];
_unit setPosASL _spawnPos;

Where _spawnPos is the position where the unit spawns.

Using 0.1 will make sure the unit is above water.

 

Cheers

Share this post


Link to post
Share on other sites

How would I do this in terms of my variables, I've tried this but it doesn't work (or give any errors)

_casSpawn setPosASL (_casPos set [2,0.1]);

 

Share this post


Link to post
Share on other sites
20 minutes ago, felipechapmanfromm said:

How would I do this in terms of my variables, I've tried this but it doesn't work (or give any errors)


_casSpawn setPosASL (_casPos set [2,0.1]);

 

set doesn't return any value, mistake on my part, I fixed the snippet above, should work.

 

Cheers

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×