Well its susposed to make it so when you enter a sector randomly after some time it teleports you to a ghost pos and makes 3 troopers appear then once youve killed em all your susposed to teleport back to the same place you were but its not working as of yet... Anyone got any ideas?
------------------
The only way to live a good life is to act on your emotions.
Code:
# Advanced Teleportation Cog
# lordvader
# Made for Lt_Greywolf
#
# Edited to try and make it work by: Lt_Greywolf, Uber(HOV),
# This Cog is not supported by LucasArts Entertainment Co.
symbols
thing player local
sector telesec
thing newpos
flex delay=500
message startup
message entered
message killed
thing t1
thing t2
thing t3
int deaths=0 local
int hasgone=1 local
template tpl_ghost=ghost local
thing theghost local
end
code
startup:
player=GetLocalPlayerThing();
Return;
entered:
if(hasgone=0)
{
Sleep(delay);
theghost=CreateThing(tpl_ghost, player);
TeleportThing(newpos, player); //if this doesn't work, try switching player and newpos
hasgone=1;
}
Return;
killed:
if(GetSenderRef()==t1 || GetSenderRef()==t2 || GetSenderRef()==t3)
{
if(GetSourceRef()==player)
{
deaths= deaths+1;
if(deaths==3)
{
TeleportThing(player, theghost);
}
}
}
Return;
End------------------
The only way to live a good life is to act on your emotions.
![http://forums.massassi.net/html/frown.gif [http://forums.massassi.net/html/frown.gif]](http://forums.massassi.net/html/frown.gif)
New code.