Game Development Community

Ducking

by Dave Gilligan · in Torque X 2D · 03/24/2008 (8:48 pm) · 4 replies

I'm trying to figure out how to get my character to duck by pressing down on the analog stick on my 360 controller, and I'm having some difficulty implementing this. I'm honestly not sure where to start, can somebody help, please?

#1
03/24/2008 (9:10 pm)
-I should add that I'm using the Platformer Starter Kit
#2
03/25/2008 (8:13 pm)
I'm not an expert at the Platformer Kit, but I think you will need a few things. First, you need an animation (or image) that represents the player in the 'duck' state. Then, you also need to update the collision polygon to reflect this state (assuming the ducking is for a reason). Then, you need to update the Animation FSM to transition into the 'duck' state. And finally, you need to update the InputMap binding to map the stick input to the 'duck' animation state. Again, I'm not the best person to give advice here, but it's a start.

John K.
#3
04/03/2008 (10:05 pm)
I've got it to where I'm able to assign an animation to 'duckanim' under Player Actor Component in TXB, so that's a start. What I need to know now is how to get it to call the 'duckanim' when I press down on the stick. Thanks!
#4
04/05/2008 (1:28 pm)
Http://www.xnadevelopment.com/tutorials/thewizardducking/thewizardducking.shtml

that might help you its for XNA games studio but you might be able to implement the code to work with Torque