It's been a while since I used playeraction, but I started to wrok on something today and hit a problem straight away. Basically, I want to make something happen when a certain control is pressed, but not what the control is actually intended for (e.g. when you jump, the cog makes you crouch instead). So can anyone tell me what's wrong with this cog please? When you press jump, instead of crouching, it still makes you jump. The message is printed to the console OK though.
Code:
# Jedi Knight Cog Script # # playeraction.COG # # Why won't this work?!? # # This Cog is Not supported by LucasArts Entertainment Co symbols message entered sector startsec message playeraction end # ======================================================================================== code entered: SetActionCog(GetSelfCog(),0x7fffffff); return; playeraction: if(GetParam(0) == 0.0) // Jump { print("Jumped, but should crouch!"); SetParam(0,1.0); } ReturnEx(1.0); return; # ........................................................................................ end