Hi all! Need some Blueprint help. I’m setting up a puzzle game and the interaction should be fairly simple, but I’m new to this so I’m all over the place!
Here’s the basic setup:
I’ve made a Class Blueprint “puzzle base” with a collection of 11 actors (want to look into making these child blueprints but I think that’ll have to wait).
Then there’s a few different, separate Class Blueprints for the 11 puzzle pieces.
I have made the puzzle pieces interactable (they can be picked up) in two ways:
1) By replacing the standard BP_PickupCube’s static mesh from the VR template. This means I can pick it up with Vive controllers.
2) By setting up a LineTraceByChannel function driven by a custom pickup event in the FirstPersonCharacter blueprint.
I need to make these 4 elements talk to eachother, probably by querying the status of the puzzle piece to see if it a) is overlapping the right component and b) has been dropped.
Once I know that I need to:
1) Tell the “puzzle base” that the “puzzle piece” is overlapping it and change a parameter of the material. Currently doing this with an overlap event connected to a cast node in the puzzle base blueprint.
2) Tell the “puzzle base” that the “puzzle piece” is overlapping it and has been dropped, changing the material entirely. Haven’t made this work yet.
3) Tell the “puzzle piece” that it’s overlapping the correct component of the “puzzle base” and that it has been dropped, toggling visibility. (Maybe Destroy Actor would work better here?)
4) At the end, tell the “puzzle base” that all of it’s components have been switched to the final material (basically the puzzle is complete) and then have it play an animation involving all pieces of the blueprint, maybe triggering other actors too.
Challenges:
I want to use the existing Blueprint Interface (PickupActorInterface) for the BP_PickupCube, but I have to test on my workstation, so I set up a linetrace pick up event using the standard FirstPersonCharacter Blueprint.
What’s best here? Blueprint Interfaces? Casting? Event Dispatchers?
Thanks very much for any help!