Eckhart 10 Posted December 14, 2010 So, I'm trying to get a unit to spawn without weapons, which was simple and works fine. However, after respawning, the default weapons of the class are produced. I looked around for awhile and messed with it for an hour or two now and can't seem to figure out why this isn't working to both spawn the first time with no weapons (which works), and then respawn after death with no weapons (which doesn't work). It seems simple enough, and that it should be working, but isn't. In the unit's init line in the editor is: removeallweapons this; this addEventHandler ["respawn", {removeallweapons this}]; Why does my crappy newbie coding not work? Share this post Link to post Share on other sites
[frl]myke 14 Posted December 14, 2010 The EH returns a array, not a single object: removeallweapons this; this addEventHandler ["respawn", {removeallweapons (_this select 0)}]; This should have the desired effect. Share this post Link to post Share on other sites
Eckhart 10 Posted December 14, 2010 Myke;1812400']This should have the desired effect. Works excellently. Thank you. Share this post Link to post Share on other sites