Jump to content
Sign in to follow this  
POTS

Problem with temporary island script

Recommended Posts

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×