I'm writing a teleport cog that does the following: once you activate one of two switches it opens up two gates. Once you go through one it takes you to the other. (Note: I have just made it so you can only go through one side at the moment...)
Portal.cog
The surfaces appear, however it doesn't teleport you.![http://forums.massassi.net/html/frown.gif [http://forums.massassi.net/html/frown.gif]](http://forums.massassi.net/html/frown.gif)
Any ideas?
------------------
Script Warehouse
The Jedi's Saber
[This message has been edited by SG1_129 (edited March 11, 2002).]
Portal.cog
Code:
# Jedi Knight Cog Script
#
# portal.COG
symbols
surface portaf1
surface portaf2
surface protaf3
surface portaf4
surface switch
surface switch2
message startup
message activated
message crossed
thing teleport
end
# ========================================================================================
code
startup:
player=GetLocalPlayerThing();
return;
activated:
SetFaceGeoMode(portaf1,4);
SetFaceGeoMode(portaf2,4);
SetFaceGeoMode(portaf3,4);
SetFaceGeoMode(portaf4,4);
Sleep(10);
SetFaceGeoMode(portaf1,0);
SetFaceGeoMode(portaf2,0);
SetFaceGeoMode(portaf3,0);
SetFaceGeoMode(portaf4,0);
return;
crossed:
geomode=GetFaceGeoMode();
if(geomode == 4)
{
TeleportThing(player, teleport);
}
return;
# ........................................................................................
endThe surfaces appear, however it doesn't teleport you.
![http://forums.massassi.net/html/frown.gif [http://forums.massassi.net/html/frown.gif]](http://forums.massassi.net/html/frown.gif)
Any ideas?
------------------
Script Warehouse
The Jedi's Saber
[This message has been edited by SG1_129 (edited March 11, 2002).]
Perhaps you could elaborate?![http://forums.massassi.net/html/wink.gif [http://forums.massassi.net/html/wink.gif]](http://forums.massassi.net/html/wink.gif)