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.

Newcomers DBPro Corner / Help with my 3d ASCII mazegame program...

Author
Message
Neon Knight
18
Years of Service
User Offline
Joined: 28th Oct 2006
Location:
Posted: 18th Nov 2006 16:53
right, my first real game in Darkbasic Professional that I wrote myself (mostly) and lo and behold, it doesn't work.

I'm not quite sure what the problem(s) are with it, here it is:





Any ideaS?
Crit
18
Years of Service
User Offline
Joined: 24th May 2006
Location:
Posted: 18th Nov 2006 17:46
You have 4 lines that wont compile. Block if statements don't use the "then" keyword.

Change these


to this:


CHESS ENCOUNTER
Demo
WIP
Neon Knight
18
Years of Service
User Offline
Joined: 28th Oct 2006
Location:
Posted: 18th Nov 2006 17:55
aha!

Thanks, much appreciated.
Neon Knight
18
Years of Service
User Offline
Joined: 28th Oct 2006
Location:
Posted: 18th Nov 2006 17:58
another question,

How do you make it so that when you hold down the arrow keys it DOESN'T repeat until you let go?

Because when you try to turn it'll often turn 3 or 4 times each time you press down the button...
Crit
18
Years of Service
User Offline
Joined: 24th May 2006
Location:
Posted: 18th Nov 2006 18:30
I made a variable called lastpressed that keeps track of the last key that was pressed. I also added an array called Beenthere, that tracks where you have been and leaves breadcrumbs on the map. Let me know if you have any questions!



CHESS ENCOUNTER
Demo
WIP
Dracula
18
Years of Service
User Offline
Joined: 7th Aug 2006
Location: DBP Recreation of Castle Csejthe
Posted: 18th Nov 2006 18:31
you can put a time loop on the duration of the hold, or add a flag that waits for release.
Neon Knight
18
Years of Service
User Offline
Joined: 28th Oct 2006
Location:
Posted: 18th Nov 2006 18:36
@crit

Clever! I should have thought of that...

*learns lesson for future*

thanks!

Login to post a reply

Server time is: 2024-11-26 08:29:06
Your offset time is: 2024-11-26 08:29:06