[Closed] Call function from one Blueprint to another with problems
Does anyone have a solution? I'm trying to call function from a HUD Blueprint to trigger event in a blueprint (elevator) or unlike, I put the HUD WIdget inside the Blueprint elevator and add in the level, worked correctly, but when I add more than 1 blueprint (elevator) within the level when I press the HUD of the first blueprint it calls the second blueprint and does not call the first, but this does not happen with the second that works correctly. Does anyone have a solution?
watch the video: https://www.youtube.com/watch?v=UMzrrm2CACo
Download the link project: https://github.com/asfe-0k/CallfucBpue4
Who has the solution could send the blueprint again with the graph?
The question has been closed Mar 08 '19 at 11:46 PM by TheSubZer0 for the following reason:
The question is answered, right answer was accepted
your script doesnt work because of how you are getting a reference to your elevator actor. your currently using a get all of class node then getting index 0 which is the wrong way to go about getting a specific actor reference. just think about it your getting all actors not just one.
so to fix your issue you need to come up with a way to reference a specific actor. there are many ways to do this via traces, overlaps, variables, etc. the question is where are you creating the widget? if your creating the widget based on say a overlap with the elevator then its a simple matter to set a variable in the widget when its created. this variable in the widget will then be the reference that you need. but like i said before it depends on the situation and where the widget is created.
answered Dec 01 '18 at 10:08 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here