I'm a complete beginner, please help me with a simple script. My editor is giving me an error and won't open the map I created in the random generator, and then opened in the editor and added the script to. It's possible that my poorly written script is "breaking" the map, and that's why it won't open in the editor and doesn't work at all.
Basically, I need a script that will do the following:
1. When a hero visits a specific object, for example, an abandoned mine, the hero will receive 2 manticores in their army.
2. The script checks if the player has 2400 gold in their account, and if they do, it takes it away.
3. At the same time, the script should trigger every time the object is visited, not just once.
4. The standard function of the abandoned mine – receiving a random resource – should be disabled.