x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: UE 4.20
Tags:
more ▼

asked Nov 10 '18 at 05:25 PM in Using UE4

avatar image

ForbidenGod
1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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).

alt text

capture.png (390.3 kB)
more ▼

answered Nov 10 '18 at 06:09 PM

avatar image

ThompsonN13
10.1k 33 10 25

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question