Its been about 10 days since i started this, but i still dont get it.
I wanted that OnClicked (StartWave_Button) it at least Print String “StartWave Called” from first picture (which is UI Widget) , and Print String “SpawnPoint is active” which is in an actor blueprint in level. But the second one (after Start Wave custom event) is not doing anything. I thought that i can call custom event with reference from another blueprint, but i guess something is there that i still dont get. It may help that i get accessed none error while doing this OnClicked event. I guess that is somehow linked to get reference node, but i just dont understand how to fix it.
I tried to put Cast to here , but i dont get what supposed to be in Object pin. Because i used Self, Spawn Point Ref, Actor ref, and none of it did anything… help me
Actor 2 - get reference to Actor 1, then cast that reference to Actor 1. then drag off from the “cast to” actor, and that would give you accessibility to the event
or if your reference is not set correctly it would also cause the blueprint not to run :).
test with get all “actors of class” and run the events with a for each loop, to ensure there are no reference issues in your blueprint
Thanks for replying, however, nothing has changed.
I tried to use Reference variable type “Actor” and another one Reference variable type “Spawn Point reference” and both result in null on print string (Cast Failed).
I also tried to do this with your testing suggestion, i put Actor class as “Actor” and “SpawnPoint” and it resultet in null too.
I tried using both Interfaces and custom event through casting - none.
Thats really strange for me that if i use reference - it says that it accessed none (reference is empty), while if i use that reference and cast it, it says that it is the same as reference and should always be success on casting, but still it fails.
I think that my problem is HERE,
that this reference references to “None”, however, i cant change it since it says "Editing this value in a Class Default Object is not allowed.
Or maybe it is not how you do it in a widget blueprint
Banarcher, i wpuld recommend watching a few tutorials on how to communicate with different blueprints… there are multiple ways of doing this…
a quick method that i could recommend for testing is running the find all actors of class on your player controller… if you only have 1 spawner on the level… use the get (copy) node from the all actors array output and get 0… the first entry … promote this to a variable.
when you create the widget (I saw you enabled expose variable on spawn) assign the object to the variable when you create the widget.
Then cast in the widget again…
that is the easiest solution i could recomend now to test with… but again i recommend you brush up on tutorials as to how blueprints work… this is some of the most basic communication you will need… and if you neglect understanding this. Blueprints will only become harder not easier in the future (talking out of personal experience) dont avoid the fundamentals
Pass the Actor to your Widget. No refference == No Communication regardless if you Cast it or not its empty by default
Here a Video recommandation on BP Communications you should also find a couple Answers on AH I did Answer that kind of Question a couple times already.
I appreciate your help, but as i said many times, i’ve watched lots of tutorials, and this is the only thing that really stands in my way. I mean i even rewatched that tutorial with Zak about 3 times and it seems like i cant even see him talking about how to properly set a reference (my tab for this is just greyed out and not active).