OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Kekc on 17 Jun 2009, 15:13:01
-
Hello again..
Tried to find answer on my question but :dunno:..
So my problem:
I made new sqs file for my mission. I did it because i want, that my soldier (hero) must respawn with M24 (on place SVD), Makarov and RPG.
In Editor it works but when I export it to my missions and begin it, than I respawn with SVD.
Just a paradisio, please help me. :blink:
-
Units always respawn with their "standard" kit, regardless of what they had before they died.
Several options:
* Use SPON Kits (http://www.ofpec.com/forum/index.php?topic=30711.0) (which does a lot of things, other than just what you want). Maybe overkill for what you want.
* Use a respawn-with-same-gear-you-died-with script (several about...search yourself).
* Add a killed handler to the unit in order to manually reapply the equipment change (where reequipplayer.sqs is the script that you already have that sets up your equipment correctly):
this addEventHandler ["KILLED", { 0 spawn { waitUntil { alive player }; exec "reequipplayer.sqs" } } ];
First and third options will respawn you with your "initial" kit. Second will respawn you with what you died with. Really up to you which type you prefer.
-
Tried this played object init... Doesn't works :no:
So, I will learn to use Spon Kits ;-)
Thank you, for your help.
Greets, Kekc :)
-
I think Toadlife/Norrin have the solution (http://www.ofpec.com/forum/index.php?topic=28740.0). Should work in A2 without problems.