Forums

Topic: Petite computer - A little help needed

Posts 1 to 3 of 3

Mattis

Hi, guess if I was excited when I found petite computer. I have made a few game for Atari 2600 with the use of Batari Basic so I atleast have an idea of structure (I hope, hehe) and now I figured I'd move on to this. It wasn't that big of a transition except for some new words to learn. But I'm having a little trouble with the buttons. I can't seem to get them right. Here is my code so far on a project where I'm trying to make a text symbol move to the right when pressing right on the d-pad, but it does nothing. What have I done wrong? I get an error saying "Out of range (8, BUTTON). P.S I just want the player to take 1 step and not move continuesly.


CLS

@LVL1

PX=10 : PY=16
LOCATE PX,PY : PRINT "@";

IF BUTTON(5) THEN GOSUB @RIGHT
GOTO @LVL1

@RIGHT
PX=PX+1
RETURN

Mattis

Justlink

button numbers
Up 1
Down 2
Left 4
Right 8
A 16
B 32
X 64
Y 128
Also, search the petit computer forum and ask there

Do you like videogames? If so, you must know
It's dangerous to go Alone.

Mattis

Thank you, got it working now and will look for it,

Mattis

  • Page 1 of 1

This topic has been archived, no further posts can be added.