How to implement PullTrigger Event?
I have two blueprints. One is the character that the player controls (Character) and the other is the weapon (Weapon).
The player presses a key which fires a custom event on Character called "PullTrigger".
I need Weapon to know when the event has happened, and to replicate to all other clients.
What I don't understand is how to allow Weapon to see if Character has called the event. I've watched the replication tutorials and the blueprint communications tutorials, but they don't seem to cover something like this. Is it possible?
asked Dec 17 '14 at 07:11 PM in Blueprint Scripting
You should be able to cast to the Weapon blueprint when the PullTrigger event fires. In the custom event you can add a "Get All Actors Of Class" wired into a "For Each Loop." From the loop's array element pin you would then use a "Cast To..." node to cast to your weapon and then connect the As Weapon pin to whatever it is inside the Weapon that needs to be aware of PullTrigger.
answered Dec 17 '14 at 07:30 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here