Skip to content

Instantly share code, notes, and snippets.

@malloc47
Created February 16, 2012 05:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malloc47/1842188 to your computer and use it in GitHub Desktop.
Save malloc47/1842188 to your computer and use it in GitHub Desktop.
COG Example
symbols
surface downsect
message activated
thing ghosttel1
thing ghosttel2
thing player local
surface upsuf1
end
code
activated:
if (GetSenderRef() == upsuf1)
{
player = GetLocalPlayerThing();
TeleportThing(player, ghosttel1);
return;
}
if (GetSenderRef() == downsect)
{
player = GetLocalPlayerThing();
TeleportThing(player, ghosttel2);
return;
}
return;
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment