Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Sprite mirror glitch

Author
Message
artanon15
21
Years of Service
User Offline
Joined: 13th Jan 2004
Location: The Negative Material Plane
Posted: 8th Apr 2004 22:15 Edited at: 8th Apr 2004 22:16
I don't know why, but no matter what i do, my Squirreler (frogger-style game with a squirrel as the main character) game squirrel sprite is constantly flipping itself. I can't find were the hole in the code is, please help!
Not as urgent:Mr.skull (grim reaper character my friend created for the game) is supposed to move back and forth and block Squirreler from getting to the top of the screen, but refuses to move.



Notes:
lifec= number of lives remaining
leveln=level number (currently has no actual usage)
relook=label at the start of the program
sprite 1=main sprite
sprite 2=enemy
sprite 3=life icon
image 5=squirrel up
image 6=squirrel right
image 7=squirrel death
image 8="mrskull"
image 9=life icon
image 10=squirrel left

"Your taunts are ill-advised templar."-Dark Templar, Starcraft
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 8th Apr 2004 23:01
Well this line is always true, so the sprite will always be flipped. But I don't know what the screen width has to do with a sprite animation.


if sprite x(2)<screen width() then sprite 2,screen width()-(sprite width(2)+1),sprite y(2),8 : mirror sprite 1

artanon15
21
Years of Service
User Offline
Joined: 13th Jan 2004
Location: The Negative Material Plane
Posted: 8th Apr 2004 23:06 Edited at: 8th Apr 2004 23:11
Oops- that line was ment to warp the main sprite to the other side of the screen if the sprite hit the edge- guess i coded it wrong. Thanks, Pincho! That fixed both problems!

"Your taunts are ill-advised templar."-Dark Templar, Starcraft

Login to post a reply

Server time is: 2025-08-09 02:12:53
Your offset time is: 2025-08-09 02:12:53