A command to check if player is crouching?

Topics regarding Scripting with Reality Factory
Post Reply
Juutis

A command to check if player is crouching?

Post by Juutis »

I was just wondering if there is a script command to check whether the player is crouching or not. I have made functional scripted weapons for my game but the problem is this: When the player stands the weapons work fine but when he crouches the shooting point stays up there where it was when he was standing. I made the system just like ZenBudha's "Perfectly functioning flashlight", I just attached a FirePoint entity instead of a SpotLight and then a little script to deal with the triggers.
User avatar
ZenBudha
Posts: 285
Joined: Wed Aug 17, 2005 6:06 am
Contact:

Post by ZenBudha »

The reason is the flashlight is being controlled by an invisible pawn. So even though the player is crouching the pawn that the flashlight is connected to is not.

So you need to make the flashlight pawn check if the player is crouching somehow and then make it crouch.

As well I'm glad to see someone else using it for a scripted weapon as that was my original reason for getting it (with much help from others) to work in tht fashion.
Fear not the textures for the almighty stylus is with thee - Book of Zen
Juutis

Post by Juutis »

Yeah, I managed to write a script to check if player is crouching using a pawn that shoots a projectile at the player and now my weapons work perfectly.

If anyone is interested in weapon inaccuracy and a nice kicking effect when shooting just tell me and I will be glad to help. :)
Post Reply