Control only 1 bullet
PolishedGamer
Member Posts: 3
Hello,
I finally figured out how to shoot bullets how I want for my platformer. It's almost perfect except for one detail.
I am using the swipe angle to determine the direction the bullet goes. The problem is if I fire two bullets in quick succession the first bullet will change it's angle to match that of the second. Example, I fire the first bullet at 75 degrees. I quickly fire the second bullet at 190 degrees. The first bullet will then change course and go at 190 degrees. I would like the first bullet to continue at 75 degrees.
Here is how I have it set up:
vector to angle sets a game attribute shootAngle based on mouse press and mouse release
bullet spawns on mouse release
bullet accelerates at direction game.shootAngle
Hope that makes sense. Thank you for any help you can give me.
I finally figured out how to shoot bullets how I want for my platformer. It's almost perfect except for one detail.
I am using the swipe angle to determine the direction the bullet goes. The problem is if I fire two bullets in quick succession the first bullet will change it's angle to match that of the second. Example, I fire the first bullet at 75 degrees. I quickly fire the second bullet at 190 degrees. The first bullet will then change course and go at 190 degrees. I would like the first bullet to continue at 75 degrees.
Here is how I have it set up:
vector to angle sets a game attribute shootAngle based on mouse press and mouse release
bullet spawns on mouse release
bullet accelerates at direction game.shootAngle
Hope that makes sense. Thank you for any help you can give me.
Comments
Then on release do the vector to angle but store it in this self.bulletangle and then accelerate to this self.bulletangle.
Hope that helps.
Lump Apps and My Assets
I'll have to experiment some more.
you do this by making 2 attributes... in the game attributes one ActorAdd (or whatever you want) and the other ActoriD in the actors self attributes
Drag in to change attributes into the bullet actor in empty area....
1. game.ActorAdd = game.ActorAdd+1
2. self.ActoriD = game.ActorADD
ps my computer froze like 10 times trying to write this comment...had to keep saving and editing lmao.