This site requires JavaScript, please enable it in your browser!
Greenfoot back
Jimmywow
Jimmywow wrote ...

2017/3/26

Shooting with Mouse -2D Platformer

Jimmywow Jimmywow

2017/3/26

#
Hey, so i wanted to know if there was a way to make it so i am able to shoot my arrows/weapons in my 2D platformer without my character rotating I don't necessarily want my character to move when shooting just be able to shoot an arrow from the character. If you need some of my code just tell me I'm still quite a newb at this and it would be awesome to learn as much as possible :D ALSO! another thing if you guys could help me out with is a life counter so instead of a health bar i have these heads that I would like to gain you one health point so, for example, I would need to know how to get a life counter on a screen and then also make it so when you touch the image you gain a life. You guys have always been awesome so i am sure you will help me in some form... THANKS!
danpost danpost

2017/3/26

#
Jimmywow wrote...
i wanted to know if there was a way to make it so i am able to shoot my arrows/weapons in my 2D platformer without my character rotating I don't necessarily want my character to move when shooting just be able to shoot an arrow from the character.
There is a way. Need more information however -- like will the arrows always shoot the same direction (if the rotation of the actor is not used)?
another thing if you guys could help me out with is a life counter so instead of a health bar i have these heads that I would like to gain you one health point so, for example, I would need to know how to get a life counter on a screen and then also make it so when you touch the image you gain a life
This is covered in my other tutorial -- my Value Display Tutorial.
Jimmywow Jimmywow

2017/3/26

#
I'm not sure how to explain it. But here is an example i guess.. when you make the zombie shooter game you want your character to move with your mouse and so when you move your mouse around the character rotates. What i want is the same thing but i don't want my character to rotate around (since this zombie shooter is a top-down i understand it's probably hard to convert) because the game is a 2-d Platformer i want my character to be able to shoot all directions but without his actual image rotating (Unless i feel like i want to spend time animating it or something) Tell me if you need me to explain more. THANK YOU so much for the quick reply, Here is an example of what my friend basically made https://www.youtube.com/watch?v=LTdqJHEq3wQ
danpost danpost

2017/3/26

#
Actually, in the Zombie Shooter Demo, the player does not rotate -- only the gun rotates.
You need to login to post a reply.