Sorta boomerang effect help?

esn23

Active member
So I wanted my character to throw out a boomerang type wepaon but instead of it coming back and vansihing i wanted it to track enemies and hit them and when the player walks up and touches the projectile it plays a catch animation and the projectile is gone or after a certain amount of hits it will destroy itself.. Should i use @cmd shooter in entity and then create another entity for the boomerang.? Would I need a custom script for if it hits x times it plays a destory animation and if she walks up and touches it it plays a catach animations and destroys itself? How would i go about coding tthis and thanks in advance for any help
 
Let's take it step by step. First, how strong do you want the homing effect? There's a native chase that will do what you ask, but IMO it actually works too well. The projectile turns instantly and flies unerringly to targets.

If you want more subtle guidance then we can look at some homing scripts. I believe @Bloodbane has some examples already available.

DC
 
yea i don't want it to turn instantly but maybe she should fire it out in front of her like your tyris demo and if it detects anyone around a close area it goes after them.. Maybe it wont go to the next target if it doesnt hit and will just go back to the player? Maybe a 40 or 50 range. Sorta like this
 
Last edited:
How to spawn this boomerang shouldn't matter 😀, you could use spawn01 or shooter function. The most important part is boomerang's AI which will be complex since it has to act on its own 🤖.
So as Damon posted, let's do this step by step:
1. Spawn/shoot the boomerang
2. Once spawned/shot, the boomerang will fly toward enemy.

I'll stop here cause we need to confirm couple things:
1. Is there range limit on how far boomerang will chase enemy or you don't mind the boomerang chases enemy placed way offscreen?
2. Are there certain enemies that boomerang won't chase?
3. What will boomerang do after it hits an enemy?
a. Attack that enemy again cause he/she/it is not dead yet?
b. Attack other enemy even though current one is not dead?
c. Stay... float still?

The video doesn't answer the questions cause Moon tiara cuts the vines but not the enemy :rolleyes:.
 
1. the range and limit should be to enemies on screen
2. No conditions i am aware of maybe a wall or obstacle that is in the way of character and enemy.
3. Boomerang will hit the next enemy on screen hitting up to like 5 or 6 enemies before returning to player
b . attack the next enemy even though the current is not dead
 
Last edited:
I decided not to think too much and used already available scripts to create this boomerang.
Here's the link : Special boomerang.

This boomerang will chase enemies when spawned. After it hits enemies 5 times (doesn't matter if blocked or not), it will fly left/right offscreen.
However, if it's spawned as child of the spawner, it will return to its parent after hitting 5 times.
 
@esn23 : While playing with the boomerang, I noticed serious flaw with the boomerang script which caused it not to work as designed. If you want to get the fixed version and also example on how to use it, you can get it in Exhibition thread.
 
Back
Top Bottom