guys, I am working on a game where there the player has a main base. this base has a health range of say 10/10. when the players base health reaches 3/10, a scout ship is sent deployed from the base and flys to the shield generator. once at the generator the scout ship sprays a particle over the generator, which in tirn causes the base health to go up by 1 every 3 seconds until it reaches 10/10. I am wondering how should I go about this. The ship that is.
Do i animate the ship deploying from the base and flying to the generator in 3ds max and then playing that animation when the base health is at 3/10? Or is there a better way to do this? how would I trigger the regeneration? do i set a tag to the scout ship and then set a OnTriggerStay event around the generator with a regeneration script attached? I am lost as of right now.
Create the animation (in Unity or 3dsMax) and keep it separated from the ship allowing you to use different ships
Put the regeneration code on the ship object enables different ships to have different regeneration types, slow / fast, more / less health …
Once health is below the threshold, “activate” the ship play the animation, enable gameObject, trigger a variable …
In the animation, have an animation event which calls the health regeneration method on the ship
Pause the animation in the regeneration method or easier, with animation keys
Once the ship is back home, reset the animation, “disable” the ship
While the process may be the same, you could do the same with waypoints, and have the ship fly from one waypoint to another. If you need more flexibility in regards of the route.