I heavily modified the MotS shootable switch cog for my level, but when I shoot the switch, nothing happens. ParSec catches nothing, and when I removed the return conditional (when it checks if the wallcel is 2), it still didn't work.
Code:
# Jedi Knight Missions Cog Script # # S1L2_Exploswitch.COG # # Shootable switch cog for level 2 # # [DB & TL] # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved #========================================================= symbols message startup message damaged message timer message activated surface panel surface other thing sparkspot thing console thing door thing edoor0 thing edoor1 template spark=+sparks local sound sparksound sound wav0=lvrclik2.wav sound wav1=df_door3-3.wav sound beep=beep1.wav sound neg flex minimumDelay=2.0 flex maximumDelay=4.0 flex nextSpark=0.5 local end #========================================================= code startup: SetWallCel(panel , 1); return; activated: if (GetSenderRef() == console) { PlaySoundLocal(beep, 1, 0, 0x0); MoveToFrame(edoor0, 1, 3); MoveToFrame(edoor1, 1, 3); } if (GetSenderRef() == door) { Print("The door is locked AND indestructible."); PlaySoundLocal(wav0, 1, 0, 0); } if (GetSenderRef()==other) { Print("The door is locked from the other side."); PlaySoundLocal(neg, 1, 0, 0); } if (GetSenderRef()==edoor0) { PlaySoundLocal(wav1, 1, 0, 0x0); Print("The elevator is remotely controlled."); } if (GetSenderRef()==edoor1) { PlaySoundLocal(wav1, 1, 0, 0x0); Print("The elevator is remotely controlled."); } return; damaged: if (GetWallCel(panel) == 2) return; if (GetSenderRef() == panel) { SetWallCel(panel , 1); MoveToFrame(door, 1, 5); CreateThing(spark, sparkspot); PlaySoundThing(sparksound, sparkspot, 1, -1, -1, 0); SetTimer(nextspark); } return; #............................................................ timer: CreateThing(spark, sparkspot); PlaySoundThing(sparksound, sparkspot, 1, -1, -1, 0); nextSpark = minimumDelay + (Rand() * (maximumDelay - minimumDelay)); SetTimer(nextSpark); return; end