I am making a pause button for JK DeathMatch.
It freezes the player and makes him invulnerable. He cannot fire weapons, use the console, anything. Here is the cog:
The problem? I press the button once, it pauses. Works like a bloody charm. The thing is, when I press it again, it doesn't do anything. Is there something about the Totaly Imobalized flag that disables input, thus making it ignore everything I do once it changes my flags? I thought that may be so, so I tried partially imobalized. This time when I pressed it after being paused it just printed paused again, and I assume it set my flags, again. What, exactly, am I doing wrong here?
------------------
All that is gold does not glitter, Not all those who wander are lost; The old that is strong does not wither,
Deep roots are not reached by the frost. From the ashes a fire shall be woken, A light from the shadows shall spring; Renewed shall be blade that was broken, The crownless again shall be king.
It freezes the player and makes him invulnerable. He cannot fire weapons, use the console, anything. Here is the cog:
Code:
# Jedi Knight Cog Script # # boss.cog # Immobalizes the player and disables the ability to use weapons. # Also makes him invinceable. # A bloody pause button for JK. # 12/22/00 #(C)Aglar 2000 Jay Inc. All Rights Reserved # This Cog is Not supported by LucasArts Entertainment Co symbols message activated thing player end # ======================================================================================== code activated: d00d = GetLocalPlayerThing(); on = 0; if (on==0) { SetActorFlags(d00d,0xA00008); Print ("Paused"); on = 1; } else { if (on==1) { ClearActorFlags(d00d,0xA00008); Print("Unpaused"); on = 0; } } Return; end
The problem? I press the button once, it pauses. Works like a bloody charm. The thing is, when I press it again, it doesn't do anything. Is there something about the Totaly Imobalized flag that disables input, thus making it ignore everything I do once it changes my flags? I thought that may be so, so I tried partially imobalized. This time when I pressed it after being paused it just printed paused again, and I assume it set my flags, again. What, exactly, am I doing wrong here?
------------------
All that is gold does not glitter, Not all those who wander are lost; The old that is strong does not wither,
Deep roots are not reached by the frost. From the ashes a fire shall be woken, A light from the shadows shall spring; Renewed shall be blade that was broken, The crownless again shall be king.