Log In  
Follow
Osis
[ :: Read More :: ]

hello everyone, I'm Osis, and I'm new to Pico 8 as well as coding, but when I found some pixel art of some Risk of Rain characters with the Pico 8 palette and most of them being 8 x 8 (a link to their work https://www.reddit.com/r/pico8/comments/mw40ui/risk_of_rain_1_characters_in_pico8_style/ ) I thought that it might be fun to try and make a game, which I have done most of it, the problem is I have a set of animations that should be playing when the player shoots, which at one point worked, however, it now no longer does I have tried going over it many times and still can't find what might be wrong

controls:
Jet pack is Up
Place Turret Is Down
Left Is left
Right Is Right
Z Is Shoot

any help with this problem or anything else you can spot in my code would be very helpful,

here is the problem code:

--

if shooting2 == true and mag >= 1 then
s_timer+=1 --shooting timer

if d == 2.8 and pushing == 0 then
if (s_timer < 4) plr.s=5 spr(6,plr.x+8,plr.y) -- this is here as one spr is more the 8x8
if (s_timer > 6) plr.s=7
if (s_timer > 8) plr.s=8
if (s_timer > 10) plr.s=1 s_timer=0 shooting2=false mag-=1
end

--

note there is this same code copied a few times but just looking for if the player is facing a different way
but even if it was just this bit it should still work I believe.

and here's the cart in full:

Cart #risk_of_rain-0 | 2023-09-24 | Code ▽ | Embed ▽ | No License
2

P#134828 2023-09-24 21:32 ( Edited 2023-09-24 21:42)