Posted by Lord of Sith on February 10, 1998 at 20:49:59:
I Would like to know what is wrong with this cog.
I can teleport the player no worries but when it comes to an enemy
No chance. It doesn't detect the enemy entering the sector.
I would like this cog to work for all enemies on my levels not just 1 or 2
Your Advice Will Be Appreciated Greatly
Werd.
Thanx For all your help!!!
# Jedi Knight Cog Script
#
# teleporter cog
#
# modified FORCEPOWER Script - Force Teleport
#
# [WERD]
#
# (C) 1998 werd!
symbols
thing position0
thing enemy mask=0xfff
sector teleporter
int dummy=-1 local
int player=0 local
int baddy=0 local
template teleport_particles=+telesparks local
sound teleportsnd=ForceThrow01.WAV
message entered
end
# ========================================================================================
code
entered:
player=GetSenderType();
PrintInt(player);
# player returned 5 when player entered.
# And absolutly nothing when enemy entered.
# dummy = CreateThingAtPos(teleport_particles, GetThingSector(player), GetThingPos(player), '0 0 0');
# SetLifeLeft(dummy, 2);
# TeleportThing(player, position0);
# dummy = CreateThingAtPos(teleport_particles, GetThingSector(player), GetThingPos(player), '0 0 0');
# PlaySoundThing(teleportsnd, player, 1.0, -1, -1, 0x180);
Return;
# ........................................................................................
end