How do I make separete events in one enemy?
The idea is for the enemy to hold 4 numbers, when shooting the correct one he dies, or else it gets faster.
asked Nov 10 '18 at 05:25 PM in Using UE4
if im getting you right you want to have four pieces of the enemy, of which one will kill it when shot, and the others will buff it when shot. its a pretty simple process depending on the method you go with. for the simplest you just need to have four volumes and a on begin overlap for each, then when the bullet overlaps you run a script to see if it was the volume that was meant to kill or buff.
in the below example i show how to accomplish this in a simple form. on begin overlap event we check to make sure the overlapping actor is a bullet via a cast then call a custom event (check number) with a parameter which identifies the volume hit. we then run the custom event which takes that parameter and and compares it to a predetermined integer via the equal node (==). if the number matches then the branch will return true and destroy the current actor (the enemy). if the branch returns false (numbers dont match) then we get the walk speed and increase it by 20% then set the max walk speed, this will make the enemy move 20% faster (this is just for an example and could be changed to affect firerate or whatever else you like).
answered Nov 10 '18 at 06:09 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here