where do you set IsVis to true? Are you sure its true at beginning?
Random Float times 5 feed for delta. Range of float is quite big then you multiply it by 5. Instead do: “random float in range” set range to-180 …180 or 0 … 360
Blue script:
if isVis is never true blue script will be never executed
if total collected is variable in coin you need to move that somewhere else, also its safer to destroy actors last when you are surethey are not needed anymore
Green script:
nothing wrong here, but that depends where did you put it. Not all actors receive input, you eitherplace those input events in player controller or player pawn, or force recive input to your actor.
To check if you get any input connect print node right to events
The problem is you do the overlap in the coin. Every coin will have this once called and once increase it’s TotalCollected amount from 0 to 1 and then if you press 0 the first coin consumes input and prints out “1”.
You have to do the overlap in your character and have a TotalCollected there thats being increased.
Not sure why an empty game object would be better. I’d just put the variable on my pawn or character. The coin BP would then update the variable on the pawn.
you can use append for your print string to build whatever you want. I’d guess you’d eventually want this on a widget though.