I have a cog that changes a ghost object into a blue key. When the player picks up the blue key, an objective is supposed to be completed, however, when the blue key is taken, nothing happens. Any explanation?
edit: Just added the code tags...
------------------
Donny Versiga
ICQ: 85623400
E-mail: Nirvan5599@aol.com
Wasting away my life building levels and playing guitar
[This message has been edited by GBK (edited November 15, 2002).]
Code:
# Jedi Knight Cog Script # # Findthekey.COG # # Enter the sector and plays Find the key sound, then generates the key in an office. # BSR 6-13-01 # # This Cog is Not supported by LucasArts Entertainment Co symbols message startup message entered message taken message trigger thing adminkeyghost thing gregoryghost template bluekey template gregory sector treeceoffice thing player local int enteredx=0 local int goaheadx=0 local sound lenkey=lenkey.wav sound goalsound=Accomplish1.wav end # ================================================== ====================================== code startup: player=JKGetLocalPlayerThing; Return; trigger: goaheadx=1; Return; entered: if ((enteredx == 0) && (goaheadx == 1) && (GetSenderRef() == treeceoffice)) {enteredx=1; sleep(5.0); PlaySoundThing(lenkey, player, 1.0, 1, 1, 0x80); Print("Crap! The key is not here! Maybe another officer took it before I got here."); sleep(5.0); Print("Maybe I should try those two offices above the officers' briefing room."); CreateThing(bluekey, adminkeyghost); CreateThing(gregory, gregoryghost); } Return; taken: if (GetSenderRef() == adminkeyghost) { player=JKGetLocalPlayerThing; SetGoalFlags(player, 3, 2); PlaySoundThing(goalsound, player, 1.0, 1, 1, 0x80); Print("Mission Objective Accomplished!"); }Return; # ........................................................................................ end
edit: Just added the code tags...
------------------
Donny Versiga
ICQ: 85623400
E-mail: Nirvan5599@aol.com
Wasting away my life building levels and playing guitar
[This message has been edited by GBK (edited November 15, 2002).]
Donny Versiga
ICQ: 85623400
E-mail: punkindrublic5@aol.com
Wasting away my life building levels and playing guitar
ICQ: 85623400
E-mail: punkindrublic5@aol.com
Wasting away my life building levels and playing guitar