Hi everyone, Ive got two separate blueprints, one for a door and one for my pickups. The pickup blueprint keeps track of how many pickups the player as collected. Now I want it so that when the player reaches a certain number of pickups the door gets destroyed. Ive tried the following nodes, but the door is not getting destroyed, but the string is getting printed.
did you make Shure your actor is valid also you could try implementing a function within the actor that might help. other than that i d need more information
Hi @Gilsa, I think I can help.
Make sure Prota Ref is set. I recommend you exposing this variable on spawn so you can set which door specifically you want to destroy.
Hope this helps.
Also to make sure I did it correctly, in my porta ref I selected the porta blueprint in the variable type and checked the expose on spawn, thats the only things I modified in the reference.
How can I make sure my actor is valid? And yeah, Ive already tried using a function that simply destroy the actor, but the actor is still not getting destroyed. Ill send you the full BP. Also when I run and close the game I get a message saying "Blueprint Runtime Error: âAccessed None trying to read property PortaRefâ. Node: Destroy Actor Graph: EventGraph Function: Execute Ubergraph BP Pickup Blueprint: BP_Pickup " , Dont know whats causing it tough.
1 Do an is valid check just click and drag from the pin youd like to know is valid
Then release Look for is valid It should show up under the utilities in 2 forms one pure
and the other as a branch
2 Take your get variable and right click then look for âconvert to validated getâ select that and your all good
also listen to jwatte hes got your initial problem sussed out
in the image you posted, the âSetâ node has no input, so it sets the variable to âNullâ (or wipes it away to null if it was set somewhere else)âŚafter that, the input into âDestroy Actorâ is null.
you need to connect a valid ref into input into the Set node.