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.

Author
Message
Hello Everyone !
14
Years of Service
User Offline
Joined: 1st Sep 2011
Location:
Posted: 3rd Nov 2011 06:34
how can i make a attack delay? because everytime i hold the attack key it stack on the attack position. any help will be appreciated.. and how can i make a health bar?

i have a problem in darkbasic codes. pls help me
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 3rd Nov 2011 08:44
You can create a TIMER() so the key is only allowed to be pressed at a specific delay. With the TIMER() command 1 second = 1000. The following checks for the spacebar but only allows it every 500 milliseconds (half a second). To make it detect faster decrease the 500... to make it detect slower increase 500.



Most of the time when we make a health bar we use a SPRITE to create it because it can be quickly stretched to the right percentage with the STRETCH SPRITE command.



Hello Everyone !
14
Years of Service
User Offline
Joined: 1st Sep 2011
Location:
Posted: 3rd Nov 2011 14:30
Wow! Thanks a lot Sir Grog. It helps me a lot! GodBless

i have a problem in darkbasic codes. pls help me

Login to post a reply

Server time is: 2026-07-10 05:45:44
Your offset time is: 2026-07-10 05:45:44