Hi
I’m trying to create a scenario where the player will have to cross a lake. The enemies in this area will be fish. That will jump at the character from the water, I also want them to take a break after jumping so the party isn’t constantly bombarded with fish. I’ve only ever created Ai that is based on sight and will follow/attack the player when spotted. So, I’m not sure how much of that I can copy into the new enemy.
in your case your fish is your AI, this video series will show you how you can make an AI jump, you will need to do extra logics to make the fish jump ex: overlap character or something like this and play the animation of fish jump along with the logic that will make damage to the character and make the fish follow the character position in range … so the fish will not only jump but it will follow the character in limited range while jumping like targeting character and play with its velocities too to make it smooth…
Not sure how advanced this needs to be but I feel that setting up a behaviour tree for what’s needed is overkill. Here’s what I got after 5 mins with projectile movement - the fish are projectiles:
Do tell if that’s anywhere close to what you need and I can post some details (if needed). If you prefer to crack it yourself, consider the following:
player enters a spawner volume which starts a timer
the timer produces a random spot in a radius around the player
we predict the arc and fire a projectile
Will need more work, for sure, but seems like it could work OK!
Rotation Follows Velocity so the fish fly head forward, hopefully
the fish deals damage to a hit pawn
the fish only live for 10s via Initial Life Span
there is an Exposed on Spawn and Instance Editable vector variable - New Velocity
that variable is set in the Construction Script - that’s how the projectile component knows the direction and force needed to launch the fish actor accurately (there’s no movement predication / target leading - so it’s easy to dodge, but can be added):