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 / Programming error or an ID10T error???

Author
Message
ScapeSta
15
Years of Service
User Offline
Joined: 28th May 2009
Location:
Posted: 14th Jun 2009 19:27
Hi I finally figured out how to animate an object walking, but the problem is when I click and hold the button to make it walk it freezes in the first position, and when i realease it continues to walk even though it's supposed to stop. Please help heres my script.

The numbers aren't exact but please help and post an edited version of the script that will solve the problem stated up there^.

"A job well done is a well done job."
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 14th Jun 2009 20:35 Edited at: 14th Jun 2009 23:14
Here is some code which should be quite self-explanatory:



In short, you only need to play the animation if the user only just pressed the key, and you only need to stop it if they just released the key.

ScapeSta
15
Years of Service
User Offline
Joined: 28th May 2009
Location:
Posted: 15th Jun 2009 02:06
Thanks Diggsey, but I use the programming language for Dark GDK. Could you refine the script to that language?

"A job well done is a well done job."
Bran flakes91093
16
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 15th Jun 2009 02:17
The code he gave you is in C++. That IS the language that Dark GDK uses.

If you are a newcomer to C++ (and really didn't know what language that Diggsey used), I suggest that you go to http://www.cplusplus.com/doc/tutorial

Your_Health = (My_Mood == HAPPY) ? 100 : NULL;
ScapeSta
15
Years of Service
User Offline
Joined: 28th May 2009
Location:
Posted: 15th Jun 2009 02:58
Bran , what I am doing is using the tutorial items (Dark GDK)
and putting them together to make an easy to use, edit, etc file for new people. Although i am a new comer I already did some of the tutorials for that. Thanks for the suggestion though!

"A job well done is a well done job."
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 15th Jun 2009 02:59
@ScapeSta
That IS the language for DarkGDK

ScapeSta
15
Years of Service
User Offline
Joined: 28th May 2009
Location:
Posted: 15th Jun 2009 03:34
Oh lolz. Sorry Diggsey. I skimmed through the script and didn't see the "db" part. Thanks!

"A job well done is a well done job."
Phosphoer
16
Years of Service
User Offline
Joined: 8th Dec 2007
Location: Seattle
Posted: 15th Jun 2009 05:53
Or the {'s and the ;'s :p

ScapeSta
15
Years of Service
User Offline
Joined: 28th May 2009
Location:
Posted: 16th Jun 2009 00:05
Phosphoer. I know i look bad. But trust me... I'm worse!

"A job well done is a well done job."

Login to post a reply

Server time is: 2024-11-05 23:11:30
Your offset time is: 2024-11-05 23:11:30