I need some help... (More help needed)

Previous topic - Next topic

augustus

Thanks to Moru for solving my original problem!

I've got the fireball code up-and-running, but now there is one more error that is preventing me from moving on to actual levels.

Code (glbasic) Select
IF fireball_exists = FALSE
fireball_x = plx
fireball_y = ply
ENDIF
IF KEY(44)
fireball_exists = TRUE
IF faceright = TRUE
fireball_speed = 1
ENDIF
IF faceleft = TRUE
fireball_speed = -1
ENDIF
ENDIF
IF fireball_exists = TRUE
DRAWSPRITE 4, fireball_x, fireball_y
fireball_x = fireball_x + fireball_speed * 1.5
IF fireball_x > 640
fireball_exists = FALSE
ENDIF
IF fireball_x < -32
fireball_exists = FALSE
ENDIF
ENDIF


'ply' is player y-coordinate, 'plx' is similar, 'fireball_x', 'fireball_y', 'fireball_speed', and 'fireball_exists' should be obvious.

Right now, I need to figure out how to have more than one fireball on the screen at a time. By 'more than one' I mean 'as many as the player wants', or 'an exorbitantly large amount'.

Moru

Hello!

Your code is drawing the fireball at fireball_x, ply. I think that should be fireball_x, fireball_y

Good luck with your game!

augustus

Yeah... that would be a problem... Thanks!

augustus

...
Another problem's come up, I'm sorry to say. Posted more information on the first post.

Kitty Hello

see the tutorial for my space shooter.

PeeJay

You might also find the tutorials on my site useful
www.peejays-remakes.co.uk
For games, remakes, and GL Basic Tutorials
Artificial Intelligence is no match for Natural Stupidity

Kitty Hello