I am making a game where the player can spawn a certain object, but I don't want the player to have more than x amount of that object at a given time. I can't figure out how to destroy said object if it exceeds x amount, or prevent the player entirely from spawning more than x amount. Would appreciate any help on this matter.
Develop games in your browser. Powerful, performant & highly capable.
To prevent it from spawning - use additional condition before spawning.
System - compare two values: ObjectName.Count < YourNumber
To prevent it from spawning - use additional condition before spawning. System - compare two values: ObjectName.Count < YourNumber
THANK YOU!