felipechapmanfromm 6 Posted May 30, 2018 _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
POLPOX 779 Posted May 30, 2018 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. 1 1 Share this post Link to post Share on other sites
felipechapmanfromm 6 Posted May 30, 2018 Thanks so much for that. Share this post Link to post Share on other sites
felipechapmanfromm 6 Posted May 30, 2018 also how would i set it so when the ai spawn in water, they dont start at the bottom and drown Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted May 30, 2018 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
felipechapmanfromm 6 Posted May 30, 2018 Thanks for that Share this post Link to post Share on other sites
felipechapmanfromm 6 Posted May 30, 2018 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
Grumpy Old Man 3546 Posted May 30, 2018 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
felipechapmanfromm 6 Posted May 30, 2018 Thanks again Share this post Link to post Share on other sites