Re: To CogKing: Teleport Cog Works


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

Posted by CogKing on February 13, 1998 at 18:14:56:

In Reply to: To CogKing: Teleport Cog Works posted by Lord Of Sith on February 13, 1998 at 17:53:48:

> Well.... It works now. I tested it this morning with commented out
> setlife etc. And it works.How would U fix the cog???
> Thankyou for your help!It is Greatly Appreciated.
> Werd.

OK, try what's below. If it is not better we'll try generating the
teleport particles with a timer...

# 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
int active=0 local
template teleport_particles=+telesparks local
sound teleportsnd=ForceThrow01.WAV
message entered
end

code
entered:
if(active) Return;
active = 1;

player=GetSourceRef();
if(GetThingType(player) == 2)
{
dummy = CreateThingAtPos(teleport_particles, GetThingSector(player), etThingPos(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);
active = 0;
Return;
}
else
if(GetThingType(player) == 10)
{
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);
active = 0;
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 ]