I am trying to make a game that's involves a character going through a maze. How do I make it so it moves with the circle pad and makes it look left if going left and vise versa. And how do I make it so it can't just walk through the walls?
Sprite movement and collision
Root / Programming Questions / [.]
DeadmanbomberCreated:
Well, i'm not familiar with sprite collisions and sprites in general, but i can help with the circle pad. to use the circle pad, you use a function similar to that of touch screen's function and button().Use the command
STICK OUT SX,SYthe X-Y position of the circle pad will be within the variables SX,SY. The variables range from 0 to 0.86, so if you want to make a sensitive input through the circle pad, you can use variables between 0 and 0.86, but it only goes to 0.86. The actual value is 0.8666666... im not sure why they chose this value, but if you're fluid enough with math, you can multiply the variables by 1/0.86666... to make the variables max out at 1, instead of this odd decimal number.
I am completely new to this stuff so I don't even know how to make a Sprite move with buttons. Like move a Sprite left with the d-pad or whatever. The only thing I have done ever is display text in a box
Once I get comfortable with this stuff, I am gonna try to make a super Mario maker style like game with completely different sprites for legal reasons.
I am completely new to this stuff so I don't even know how to make a Sprite move with buttons. Like move a Sprite left with the d-pad or whatever. The only thing I have done ever is display text in a box
'Here's at least what I know. It won't cancel others yet, so if you find out, let me know. 'Spriteset: SPSET 0,X,Y 'The first number's the sprite number, and the X and Y's the coordinates from the spritesheet to read for its sprites. @LOOP B=BUTTON() 'In the parentheses, 0=latest input, 1=When Pressed (repeat on), 2=Same as 1 without repeat, and 3=When released. 'Buttons all have binary code attached, but I suggest sticking with #A, #B, #Y, #X, etc. 'EXAMPLE: If B == #A then print "Button A"
I am completely new to this stuff so I don't even know how to make a Sprite move with buttons. Like move a Sprite left with the d-pad or whatever. The only thing I have done ever is display text in a box'Here's at least what I know. It won't cancel others yet, so if you find out, let me know. 'Spriteset: SPSET 0,X,Y 'The first number's the sprite number, and the X and Y's the coordinates from the spritesheet to read for its sprites. @LOOP B=BUTTON() 'In the parentheses, 0=latest input, 1=When Pressed (repeat on), 2=Same as 1 without repeat, and 3=When released. 'Buttons all have binary code attached, but I suggest sticking with #A, #B, #Y, #X, etc. 'EXAMPLE: If B == #A then print "Button A"
'By "others", I mean other inputs.
Please have a look at the Time-Index for this (and other) Question. The last Post was 4 Years ago. So it is potential answered.'Here's at least what I know. It won't cancel others yet, so if you find out, let me know. 'Spriteset: SPSET 0,X,Y 'The first number's the sprite number, and the X and Y's the coordinates from the spritesheet to read for its sprites. @LOOP B=BUTTON() 'In the parentheses, 0=latest input, 1=When Pressed (repeat on), 2=Same as 1 without repeat, and 3=When released. 'Buttons all have binary code attached, but I suggest sticking with #A, #B, #Y, #X, etc. 'EXAMPLE: If B == #A then print "Button A"'By "others", I mean other inputs.