To CogKing: Teleport Cog


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]

Posted by Lord of Sith on February 12, 1998 at 20:11:24:

Thanx Cogking. I can detect a player or enemy entering my sector now!!
But that has caused another problem. If I set sector mask as 0xfff it
detects enemy and player BUT it will not teleport.It will do everything
else but teleport the thing that enters the sector.Teleport Particles
Appear, Same with the sound but neither the player nor the enemy actually
teleport. When sector mask is deleted it doesn't detect enemy BUT it
will detect player and also teleport the player.I have tried masks for
The ghost object , the -Int Player=0 in the symbol code.Thankyou For
Your Help CogKing (Now I know why they call U CogKing).

Any Idea When A New Specs Will be out???

Would Anyone know why my level is freezing my computer??

I have only encountered this problem since I started using jed V0.3
And JKPatch Commander V2.5. It never happened in jed V0.2


# Jedi Knight Cog Script
#
# teleporter cog
#
# modified FORCEPOWER Script - Force Teleport
#
# [WERD]
#
# (C) 1998 werd!

symbols

thing position0

sector teleporter mask=0xfff

int dummy=-1 local
int player=0 local

template teleport_particles=+telesparks local

sound teleportsnd=ForceThrow01.WAV

message entered

end

# ========================================================================================

code

entered:
player=GetSourceRef();
if(GetThingType(player) == 2)
{
PrintInt(player);
dummy = CreateThingAtPos(teleport_particles, GetThingSector(player), GetThingPos(player), '0 0 0');
SetLifeLeft(dummy, 1);
TeleportThing(player, position0);
dummy = CreateThingAtPos(teleport_particles, GetThingSector(player), GetThingPos(player), '0 0 0');
PlaySoundThing(teleportsnd, player, 1.0, -1, -1, 0x180);
Return;
}
else
if(GetThingType(player) == 10)
{
PrintInt(player);
dummy = CreateThingAtPos(teleport_particles, GetThingSector(player), GetThingPos(player), '0 0 0');
SetLifeLeft(dummy, 1);
TeleportThing(player, position0);
dummy = CreateThingAtPos(teleport_particles, GetThingSector(player), GetThingPos(player), '0 0 0');
PlaySoundThing(teleportsnd, player, 1.0, -1, -1, 0x180);
Return;
}
Return;
# ........................................................................................

end




Follow Ups:



Post a Followup

Name:
E-Mail:
Subject:
Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]