Spawning an object
-
- Prole
- Posts: 16
- Joined: Fri Jan 15, 2016 6:33 pm
Re: Spawning an object
But the problem is the plane moves. Is there a way the x and y coordinates for the bomb to spawn follow the plane?
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Spawning an object
First, please delete 3 of your 4 posts. (and next time, make sure to see whether your post went on the next page or not )
Second, using a table for the plane's data like for the bombs, you can get the plane's x and y position in the bomb spawning function; so you'll always spawn the bombs where the plane is, even if you moved it.
Edit: apparently i managed to misread the question, sorry about that; look at S0lll0s' answer instead.
Second, using a table for the plane's data like for the bombs, you can get the plane's x and y position in the bomb spawning function; so you'll always spawn the bombs where the plane is, even if you moved it.
Edit: apparently i managed to misread the question, sorry about that; look at S0lll0s' answer instead.
Last edited by zorg on Sat Jan 16, 2016 5:01 pm, edited 2 times in total.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
-
- Prole
- Posts: 16
- Joined: Fri Jan 15, 2016 6:33 pm
Re: Spawning an object
Yeah sorry about that. I was a bit confused thank you so much for the help. I will try this later and tell you if it works. I really appreciate your help
Re: Spawning an object
or you just update the bombs with their own speed, you set the x-velocity (speed) when you spawn them and add it to the x coordinate every frame. Otherwise if you fly zig-zag the bombs will do that too, which will be pretty weird.
Who is online
Users browsing this forum: Bing [Bot] and 2 guests