Hi, I would like to know if its possible to make a “Building System” in blueprint. For example if i’m making a survival game and if i want to make lets say a raft or something, I’ll need to collect 5 Logs and put them in a certain spot and once all 5 are placed there the full raft spawn for me to use. If anyone knows if this is possible please tell me and also explain a bit on it
Ok thanks for the reply I forgot to mention 1 thing. I would like to Outline where items need to be placed so players know where to add their materials would something like that be in cascade?
Something like this >
I’m kind of new to blueprint so bare with me. By Spawn Actor do you mean “SpawnActor” “SpawnActor StaticMeshActor?”
and there are like 5 line traces im not sure which one to use. Also is this stuff in the Mycontroller Blueprint or somewhere else?
It looks like that’s a picture of The Forest, in which case for a system like that you’re most likely going to need a separate blueprint (probably based on Actor) for each buildable object in the game to keep track of how many materials you need and how many you’ve currently added, that’s what you’d be spawning with SpawnActor.
If you wanted the full ‘The Forest’ effect with logs being visually added as you add materials you’d need to make each log a separate mesh and then add them (or change their material) as you add materials to it, it could be a bit tricky and something you could add after you’re a bit more confident with blueprints and you have a basic system in place. You could also use that blueprint for any interaction with it you might have once it’s been built, like lighting a fire for example.
As has said, if you haven’t gone through the video tutorials it would definitely be a good idea, they’re packed with great information relevant to this sort of thing, and you’re most likely going to need to know your way around a Blueprint Interface for a system like this (I have a system similar to that and it’s very dependent on Interfaces).
Ok i got Transparent material working and im able to spawn it. But can someone tell me how to make it spawn where my cursor is and allow it to follow the mouse until left click is pressed?
Basically you’d do a line trace from your cursor (probably on a key press), spawn the actor at the hit location of the line trace, save the actor you spawned into an actor variable, do a line trace every tick to get the new cursor position, update the position of your building with the new cursor position and finally when you left click you’d stop updating the position, stop doing line traces and remove it from the variable you assigned earlier.
I’m sorry but which line trace do i use, there are like 8 of them and when i try to compile it gives a error “Default value” for ObjectTypes is invalid: “” is not a valid enumerant of '<EObjectTypeQuery>"
Thanks, that helps alot! But do you know of any way to snap the spawned actor to the ground so they cannot be spawned in the air or halfway through the floor?
Ok, I tried what you said but im pretty sure i did it wrong because i got a error…Also im not sure what you ment about using a boolean to track the tracer can you explain more or send me to a tutorial or something?