malakdecaen 3 Posted September 22, 2013 Hi everybody , I want to know if is possible to spawn a AI when a player die ? and if is possible to spawn the AI but with the same gear and the same position ? exemple : I die with a m16 and a backpack , i want the AI spawn with the same gear at the same position after 5 minutes . It is possible to do that ? and how can i do that please ? Thanks a lot . Share this post Link to post Share on other sites
Zenophon 110 Posted September 23, 2013 First, you need to determine if the player is dead, then execute the spawning function. You could use these: http://community.bistudio.com/wiki/addEventHandler http://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Killed http://community.bistudio.com/wiki/createUnit This is an example: player addEventHandler ["killed", { 0 = _this spawn { _spawnPos = getPosATL (_this select 0); sleep (5 * 60); "o_soldier_f" createUnit [_spawnPos, (createGroup east)]; }; }]; The eventHandler will execute locally and 'createUnit' has global effect, so only one AI will spawn and all clients will see it. You would also need some function to save the player's loadout to give the AI. I recommend a forum/google search for that. Share this post Link to post Share on other sites
malakdecaen 3 Posted September 23, 2013 yeah that exactly what i'm looking for , thank you zenophon i will try that Share this post Link to post Share on other sites