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
Onyx10
23
Years of Service
User Offline
Joined: 31st Mar 2003
Location:
Posted: 6th Apr 2003 23:26
I am currently working on a 2D RPG with DarkBASIC. I want it to be like Chrono Trigger, my all time favorite game. I know how to use a gamepad with DB, but now I need to make it where whenever I move my character and hold in the B button, he runs. If anyone knows how to do this, please tell me. I'd appreciate it. And if anyone wanted to help me with my RPG, that'd be cool.
Blazer
23
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: United States
Posted: 6th Apr 2003 23:53 Edited at: 7th Apr 2003 00:25
I dont quite understand the question, do you mean run as in move? or run as in animate?

can't help you with motion on the gamepad

but if it's animation you want try this snippet:


FOR i=1 to 7
GET IMAGE i,(i-1)*88,0,i*88,150
NEXT i

do
INC frame
IF frame > 7 THEN frame = 1
ENDIF

SPRITE 1,0,0,frame
loop


for this to work, you need a picture 88 things long, and 6 frames of animation

As I walk through the vally of the shadow of death, I will fear no evil.
- Psalms 23:4
John H
Retired Moderator
23
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 7th Apr 2003 00:19
I think he means run, as in make the character go faster (which would also need an animation as well )

So you could say

While upkey()=1
your movement code
if (b)>0
make your objects speed greater
endif
enwhile

Current Project: Eternal Destiny
Tech Demo - Colan Island: Currently 716 Lines
Onyx10
23
Years of Service
User Offline
Joined: 31st Mar 2003
Location:
Posted: 7th Apr 2003 21:39 Edited at: 7th Apr 2003 21:47
Yeah, those of you who play RPGs probably know that whenever you hold in a button it makes your character run (as in move faster). So would this be right?:

while joystick firebutton b()=1
---------
if(b)>0
make your objects speed greater
endif
enwhile

Sorry, I'm pretty new at DarkBASIC, and I don't really know too much. Could someone maybe tell me how to make a 2D matrix, too?

I also don't know how to make these "animations". Thanks

Login to post a reply

Server time is: 2026-06-11 15:09:25
Your offset time is: 2026-06-11 15:09:25