POTS 0 Posted December 31, 2008 I have a script thats supposed to except the Unit as an argument and put him on an island for a while then send him back. Basicaly he respawns onto the island and just shoots at the shooting range tell he can come back in. I have it so his gun is refreshed and everything as well. It won't work at all, i don't know why. Could somebody take a look at it? It's called by an eventhandler. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _UNIT = _this; _GUNS = weapons _UNIT; _AMMO = magazines _UNIT; _GUNCOUNT = count _GUNS; _AMMOCOUNT = count _AMMO; sleep 15; removeAllWeapons _UNIT; _c = 0; while {_c <= _GUNCOUNT} do {_UNIT addWeapon (_GUNS select _c);_c = _c + 1;}; _c = 0; while {_c <= _AMMOCOUNT} do {_UNIT addMagazine (_AMMO select _c);_c = _c + 1;}; _UNIT setPos getMarkerPos "BASE"; exit; Share this post Link to post Share on other sites
POTS 0 Posted December 31, 2008 I think i've pinpointed the problem but I do not know how to solve it. The _UNIT = _this is supposed to let variable _UNIT take on the argument unit when the eventhandler calls it. It's not. This is so confusing. I cant figure it out. Share this post Link to post Share on other sites
[frl]myke 14 Posted January 1, 2009 Answered your question here. Share this post Link to post Share on other sites