I’m trying to do a project, and I was wondering if this looked correct because I am highly unsure what to do with it, I was wondering if there’s anything I can do to improve it.
I did all the values; I need to set up three functions in Unreal Engine corresponding to the actions my character can take. The first function should represent picking up a cat. This function should take one input, which is the ID of the cat to pick up. Inside the function, I need to modify the value that represents which cat is in arms based on the input value. I also need to use the value of the variable that indicates character’s current location (AtCar), to decide which variable (either CatsInHouse or CatsInCar) to subtract the given cat’s value from. Additionally, the function should increment the number of steps completed (StepsCompleted). Finally, the function should call a provided function, EvaluateStep, to verify that the actions have been performed correctly.
However, I’m unsure about how to set up these functions, add the input parameters, and call the EvaluateStep function in Unreal Engine’s Blueprint system. Any guidance on how to accomplish this would be greatly appreciated.
I am mainly struggling with the functions and how to do it.
Well… what are you trying to do? You didn’t state your goal here.
If it’s just initializing values, you can set the default values to be these so you don’t have to set them all on begin play… But if you look at any text-based code, this is pretty similar to your typical initialization.
Use a trigger box to determine if your in a given area, this will provide you with the event onOverlap… you can then set a bool weather your inside or outside etc,
Do a line trace from camera to determine which cat your looking at
These are some things for you to lookup more than a how to do exactly type thing
But itll certainly get you going in the right direction
Idk how new you are so sorry if this part comes off as rude, but id look up some decent tutorials on the basics
Search for “Matt Aspland”
“Ryan layley”
Theyve got some solid tutorials where they explain how the things work so you can figure out how to use them together to make what your making
Here is basically a list of the videos i used to learn most of the basics
I’m working on three functions within a blueprint: PickUpCat, DepositCat, and SwitchLocations.
PickUpCat: This function modifies the value that indicates which cat is in the character’s arms using conditional logic.
DepositCat: This function determines whether the character is at the car or the house.
SwitchLocations: This function uses a NOT Boolean node to get the opposite of the current location value (e.g., switch from the house to the car).
It is like puzzle that is quite challenging and I don’t need to add anything extra outside the blueprint. Like cameras or character. However, I need some guidance on which Boolean operators to use to get started in the right direction for each function, as they can be confusing.
It would allow you to have a cat on your lap while in the car and have it meow incessantly, all at once - as cats do - but in a single variable. You also get special operators to manage those states. Docs: