0
\$\begingroup\$

I have a project where a minion overlaps the tower.

Needless to say, the problem occurs when more than one minion overlaps the tower at the same time.

It turns out I've figured out how to go through this problem, or at least ways.

It is only to condition a certain event/function once and define a loop.

I can cause the damage to be applied to the tower correctly if I make the code in the tower (adding an information about the amount of minions overlapping the tower).

Blueprint:

enter image description here

The problem is that the overlap oscillates. This disrupts the reception of variable information, since the minion at some point stops overlapping the tower.

I tried to fix this by adding a parameter to the event, but using it I can not reference the tower variable:

enter image description here

Not even using the construction script:

enter code here

I thought of something like a variable receive the reference of the tower, and if at the time of receiving the variable the reference of the tower fails, use it.

But all that I tried in this sense, something similar happened to that shown in figure 2.

\$\endgroup\$
0
\$\begingroup\$

Finally. To store the information of the tower that is colliding with the minion, just create a parameter with the type of the tower object, and not as an actor:

enter image description here

That way, since the event is called only once because of the boolean variable, everything works out. The reference does not fail and the damage to the tower is applied correctly regardless of the amount of minions.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.