Reset last saved position.
Posted: August 12th, 2011, 10:20 pm
I have this code to reset a player last position when (s)he lands on the trigger,
Unfortunatley im unable to get this to work because i dont have the '_codjumper.gsc' in this line
other thread maps\mp\gametypes\_codjumper::loadPos(); and was just wondering if anyone knew the code to put inside the '_codjumper.gsc' file and could post it here to help me to get this to work, if not a different code? many thanks.
Code: Select all
stachel_Reset()
{
ent_ResetLoad = getentarray("reset","targetname");
if(isdefined(ent_ResetLoad))
{
for(lp=0;lp<ent_ResetLoad.size;lp++)
ent_ResetLoad[lp] thread _ResetLoad();
}
}
_ResetLoad() //As soon as player is touching trigger "reset" -> thread loadPos()
{
self endon("disconnect");
self endon("killed_player");
self endon("joined_spectators");
while(true)
{
self waittill("trigger",other);
wait(0.10);
other thread maps\mp\gametypes\_codjumper::loadPos();
wait(0.10);
}
}
other thread maps\mp\gametypes\_codjumper::loadPos(); and was just wondering if anyone knew the code to put inside the '_codjumper.gsc' file and could post it here to help me to get this to work, if not a different code? many thanks.