Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Animation controls switch

Author
Message
thm120
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location:
Posted: 19th Aug 2009 02:13 Edited at: 19th Aug 2009 02:16
ok i already have a set of walking animation, now i added a crouching animation and i would like to make it so that when the crouch button is pressed, the walking controls play the crouch walking animation, then when c is pressed again, it stands up and plays the regular animation.



lastly, how would i make it so that when i press C the crouching pose is showed and the player moves down to be level with the map, then when i press C again he returns to his regular height.

i tried dbMoveObjectDown but i have no way of bringing him back up
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 19th Aug 2009 04:59
have a variable. And when you click the c button this variable is equal to one and when you release the c button the variable is set back to 0. Then in the walk forward control use this:

you will obviously have to change the animation numbers to make it work right.

For the 2nd question. What you want to do is move the object down when the c button is pressed to make the player crouch (and only pressed not held) then move the object back up when the c button is pressed to make the player stand up. The key to this is only doing it when the button is pressed for the first time, otherwise the object will go up or down continuously.

Games are like life, they should never stand still.
thm120
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location:
Posted: 19th Aug 2009 06:57
thanks but i need some clearification on the variables part as in how to do it

i tired int crouch = (dbKeyState(46)== 1); but i just know i'missing alot...i have very little experience with variables
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 19th Aug 2009 20:24 Edited at: 19th Aug 2009 20:26
try this:





Games are like life, they should never stand still.

Login to post a reply

Server time is: 2024-11-20 17:32:00
Your offset time is: 2024-11-20 17:32:00