I need some help

I am trying to make a game where when you press and hold "d" the character would run left. How would i set it up to do that using tb bronze?

Comments

Responding to the key "d"

Hi,

If you want you game sprite to move while the "d" key is depressed and to stop when you release the "d" key then use

DO

GET KEY key
IF key=68 or key=100 then ! the ascii code for D and d
REM: move the sprite
REM: for other movements use ELSEIF key=ASCii key number
ELSEIF key=27 then ! ESC key
EXIT DO
ELSE
REM: stop the sprite
END IF

LOOP

The loop will continue to look for any key being depressed until you press the ESC key which will exit the loop.

Big John

Thanks

Thanks for the help

hi

Can you elaborate?

Yeah

i have the character made. I want to make a game that is 2d and uses the controls of "w" for jump, "a" to walk backwards, "s" to crouch, and "d" to walk forward. And space to do an attack probably a projectile. Is it possible to do on tb bronze? Do you need more of an explanation?

Yes

Yes it sounds like it would be possible but i'm new to programming and not on that level yet you should ask big John he could tell you how to go about doing it.

thanks

ok thanks anyway