Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Teleport cog again...
Teleport cog again...
2001-06-29, 4:12 AM #1
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;
End

The final teleport back to your first position never works... Help!

------------------
The only way to live a good life is to act on your emotions.

↑ Up to the top!