Ambiera Forum

Discussions, Help and Support.

Create a new account, Search, or Login:
Name:  Password:
Ambiera Forum > CopperCube > Help with CopperCube
Homing bullet?
Author Text

demonnoteternal
Registered User
Quote
2021-07-21 14:40:51

Hey! While making my game, I ran into the problem that I can't implement one of my ideas, namely a homing bullet (there is a bullet and in theory it should be aimed at a magnet object). The method that I came up with does not work, and the game will not be so interesting without it. I will be very happy if someone help me <:0


veganpete
Registered User
Quote
2021-07-21 22:13:10

I made a homing missile for my game (with no coding).
It was pretty easy to do; here's the basics of how I got it working.....

I added a game character behaviour to the missile and the enemies.

When the missile is fired, I used: every few seconds (50ms), move towards node action (to move the missile to the targeted enemy), I also added a turn towards event (to make the missile always point at the target).

I attached an on proximity event to the missile (to make it explode when the missile is close to the enemy).

I added a particle effect to make a rocket-trail.

Don't use the Shoot action to fire your bullet - because it will override anything movemtns you try to make with the homing bullet and will force it to fly in a straight line instead.




demonnoteternal
Registered User
Quote
2021-07-22 11:39:37

@veganpete Thank you so much! Will use it


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internat?onal" (you are not logged in)


Text:

 

  

Forum Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons