Announcement

Collapse
No announcement yet.

Question about Event Dispatchers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Question about Event Dispatchers

    Question about Event Dispatchers

    When my player presses 'attack' an attack actor(AA) blueprint is spawned. When AA is destroyed the event is dispatched back to the player; this indicates the player may move, attack again, or whatever.

    That works great but leaves me to wonder what would happen if I had two players?

    For example ...

    Let's say our attack is called Ray Blast(RB). RB will dissolve upon impact or after 3 seconds. During the effect of RB the player cannot move.

    Player 1 fires RB.
    Player 2 also uses RB half a second later.

    The attack from Player 1 misses so Player 1 cannot attack for 3 seconds. However, the attack from Player 2 collides -- Player 1's attack is still in progress. Given that Player 2's attack has collided the actor is destroyed, and the event dispatcher is called.

    Assuming both players are using the same blueprint would calling the event dispatcher for Player 2's attack also affect Player 1. Would Player 1 be able to move again even though they should not be able to for another 2.5 seconds?

    Or will we receive the desired results of Player 1 being unable to attack momentarily and Player 2 able to attack again? What determines whether Player 1 or Player 2 blueprint are called upon destroying the attack actor?

    Unpopular Minion on the Play Store (Released: January 31, 2016)
Working...
X