I've done a lot more to the cog now, Ive added the 8 hatches, "zooming" cameras and Unistring prints.
# Jedi Knight Cog Script
#
# goauldtele v4.1.cog
#
# Teleport cog that emulates the teleporters in Stargate
#
#
# -•?O( VERSION 4.1 )O?•-
#
# ------------------
# Improvements in v4.1
# Added string printing and camera sets back to original
# ------------------
# Improvements in v4
# Added moving cameras
# ------------------
# Improvements in v3
# Tweaked timing of movements and added hatches
# ------------------
# Improvements in v2
# Added delay so as to prevent people following in behind,
# and an active message to stop reactivation whilst in use.
# ------------------
#
#
# Made by Nomi, with thanks to Cave_Demon for the original
# cog from which I learnt to do teleporting and camera
# changing. Cheers Cavey
#
# This COG is not made or supported by LEC
#
# [RS]
#
#--------------------------------------------------------
Symbols
thing switch linkid=1
thing source
thing destination
thing storage
thing cameraS
thing cameraD
thing player local
sound startsound
sound endsound
thing ring1 linkid=2
thing ring2 linkid=2
thing ring3 linkid=2
thing ring4 linkid=2
thing ring5 linkid=2
thing ring6 linkid=2
thing ring7 linkid=2
thing ring8 linkid=2
thing hatch11 linkid=2
thing hatch12 linkid=2
thing hatch13 linkid=2
thing hatch14 linkid=2
thing hatch15 linkid=2
thing hatch16 linkid=2
thing hatch17 linkid=2
thing hatch18 linkid=2
thing hatch21 linkid=2
thing hatch22 linkid=2
thing hatch23 linkid=2
thing hatch24 linkid=2
thing hatch25 linkid=2
thing hatch26 linkid=2
thing hatch27 linkid=2
thing hatch28 linkid=2
template telesparks=+firecloud
flex speed=3.0
flex delay=1.0
flex unistring1 desc=startstring
flex unistring2 desc=endstring
int active=0 local
int origcam local
message activated
end
#--------------------------------------------------------
code
activated:
if(GetSenderID() != 1) Return;
if(active) return;
active = 1;
player = GetSourceRef();
origcam = GetCurrentCamera();
Sleep(0.1);
SetActorFlags(jkGetLocalPlayer(), 0xa00000);
SetCameraFocus(1, cameraS);
SetCurrentCamera(1);
jkPrintUNIString(player, unistring1);
Sleep(0.5);
MoveToFrame(hatch11, 1, 5);
MoveToFrame(hatch12, 1, 5);
MoveToFrame(hatch13, 1, 5);
MoveToFrame(hatch14, 1, 5);
MoveToFrame(hatch15, 1, 5);
MoveToFrame(hatch16, 1, 5);
MoveToFrame(hatch17, 1, 5);
MoveToFrame(hatch18, 1, 5);
Sleep(1);
MoveToFrame(CameraS, 1, 2);
MoveToFrame(ring1, 1, speed+3);
Sleep(0.25);
MoveToFrame(ring2, 1, speed+2);
Sleep(0.25);
MoveToFrame(ring3, 1, speed+1);
Sleep(0.25);
MoveToFrame(ring4, 1, speed);
Sleep(2);
TeleportThing(source, player);
TeleportThing(player, storage);
CreateThing(telesparks, source);
Sleep(0.05);
CreateThing(telesparks, source);
PlaySoundThing(startsound,cameraS,9,9,9,0x1000);
MoveToFrame(ring4, 0, speed);
Sleep(0.25);
MoveToFrame(ring3, 0, speed+1);
Sleep(0.25);
MoveToFrame(ring2, 0, speed+2);
Sleep(0.25);
MoveToFrame(ring1, 0, speed+3);
Sleep(1);
MoveToFrame(hatch11, 0, 5);
MoveToFrame(hatch12, 0, 5);
MoveToFrame(hatch13, 0, 5);
MoveToFrame(hatch14, 0, 5);
MoveToFrame(hatch15, 0, 5);
MoveToFrame(hatch16, 0, 5);
MoveToFrame(hatch17, 0, 5);
MoveToFrame(hatch18, 0, 5);
Sleep(1);
SetCameraFocus(1, cameraD);
SetCurrentCamera(1);
Sleep(0.5);
MoveToFrame(hatch21, 1, 5);
MoveToFrame(hatch22, 1, 5);
MoveToFrame(hatch23, 1, 5);
MoveToFrame(hatch24, 1, 5);
MoveToFrame(hatch25, 1, 5);
MoveToFrame(hatch26, 1, 5);
MoveToFrame(hatch27, 1, 5);
MoveToFrame(hatch28, 1, 5);
MoveToFrame(CameraD, 1, 2);
Sleep(1);
MoveToFrame(ring5, 1, speed+3);
Sleep(0.25);
MoveToFrame(ring6, 1, speed+2);
Sleep(0.25);
MoveToFrame(ring7, 1, speed+1);
Sleep(0.25);
MoveToFrame(ring8, 1, speed);
Sleep(2);
jkPrintUNIString(player, unistring2);
CreateThing(telesparks, destination);
Sleep(0.05);
CreateThing(telesparks, destination);
PlaySoundThing(endsound,cameraD,9,9,9,0x1000);
Sleep(0.01);
TeleportThing(player, destination);
MoveToFrame(ring8, 0, speed);
Sleep(0.25);
MoveToFrame(ring7, 0, speed+1);
Sleep(0.25);
MoveToFrame(ring6, 0, speed+2);
Sleep(0.25);
MoveToFrame(ring5, 0, speed+3);
Sleep(1);
SetCameraFocus(1, player);
SetCurrentCamera(origcam);
ClearActorFlags(jkGetLocalPlayer(), 0xa00000);
MoveToFrame(hatch21, 0, 5);
MoveToFrame(hatch22, 0, 5);
MoveToFrame(hatch23, 0, 5);
MoveToFrame(hatch24, 0, 5);
MoveToFrame(hatch25, 0, 5);
MoveToFrame(hatch26, 0, 5);
MoveToFrame(hatch27, 0, 5);
MoveToFrame(hatch28, 0, 5);
MoveToFrame(CameraS, 0, 20);
MoveToFrame(CameraD, 0, 20);
Sleep(delay);
active=0;
Return;
#--------------------------------------------------------
end
Ruthervain, youre doing the Stargate mod for JK, arnt you?
Ps. I've also got a working test level for this. Looks pretty damn good.
Nomi