So I’ve got a money variable in one blueprint called “Character1” then I’ve got another blueprint called “coin” that adds to the “money” variable. But I can’t figure out how to add them.
I’m using 4.8.1
Thanks
So I’ve got a money variable in one blueprint called “Character1” then I’ve got another blueprint called “coin” that adds to the “money” variable. But I can’t figure out how to add them.
I’m using 4.8.1
Thanks
It’s not a good idea to have a Coin blueprint for storing the amount of coins the player has since there are probably multiple coins, you should probably do that in the character blueprint.
You’ll need to get a reference to the other blueprint and access it’s money variable.
If you’re not sure how to do this:
Edit: That being said, (depending on the uses of coin) I would recommend making it an actor component or placing the logic directly into the character (as suggested by Jamendxman3)
The “coin” blueprint is a ACTOR blueprint not just a blank blueprint holding a variable. And still not getting how to set the value of the money vaiable.
Just increment a coin variable in your player once you collide with a coin, and then cast to the coin and call Destroy Actor.
Thank you both:) thats what I need
Alright, just post back here if you still have trouble with this problem, otherwise start a new thread.