Code:
symbols
thing player local
sector telesec
thing newpos
flex delay=3
message startup
message entered
message killed
thing t1 linkId=5
thing t2 linkId=6
thing t3 linkId=7
int deaths=0 local
int hasgone=0 local
template tpl_ghost=
template stormtroop=
thing theghost local
end
code
startup:
player=GetLocalPlayerThing();
Return;
entered:
if(hasgone=0)
{
Sleep(delay);
theghost=CreateThing(tpl_ghost, player);
TeleportThing(player, newpos); //if this doesn't work, try switching player and newpos
hasgone=1;
}
CreateThing(stormtroop, t1);
CreateThing(stormtroop, t2);
CreateThing(stormtroop, t3);
Return;
killed:
if((GetSenderRef()==5) || (GetSenderRef()==6) || (GetSenderRef()==7))
{
if(GetThingParent(GetSourceRef()) == player);
{
deaths = deaths+1;
if(deaths==3)
{
TeleportThing(player, theghost);
}
}
}
Return;
EndThe final teleport back to your first position never works... Help!
------------------
The only way to live a good life is to act on your emotions.