I am trying to set up a money system in my game.
I have imported a static mesh and then created a blueprint from it. I set up it’s collision to allow for overlapping and programmed it to add to a variable and then destroy itself when the player runs over it. Only it doesn’t work, for some reason. Any help would be appreciated. I have attached a screenshot of the blueprints of the mesh.
What part isn’t working? Does event fire? Does money get incremented? Dies the message get displayed?
your pickup is paying itself. use the OtherActor reference, cast it to your character type, and set the character’s money variable, instead of the pickup’s money variable.
The ‘Begin Overlap’ event doesn’t fire at all.
Thanks, fixed that. Now I just have to get the event to fire; I don’t see the reason why it doesn’t.
check the objects collision. the money pickup should have a box or sphere collision component as its root component, and its collision setting should be set to overlap pawn and ignore all other types.