Hello.
This is my first post on the forum. I am not necessarily new at the Blender Game Engine, in fact I have a good bit of experience with it. However, I have next to no experience with Python scripting, and so if its required, please bare with me as I try and make sense of it. Thank you.
I am currently designing a dungeon exploring game that is based on random generation. Random loot, random enemies, random rooms, etcetera. However, I’ve run into an issue that I cannot fix for the life of me.
The player walks up to a chest, and activates it. A random actuator goes off, using the “integer uniform” setting, and it chooses a random number between 1 and 199. This value represents how much gold is looted from the chest.
The issue I have is that I have no idea how to replicate / transfer this integer to my gold gold counter, which is an integer on another object. I need the gold that is acquired to be added to the player’s gold stores.
If it helps, an example: the random actuator chooses 120 as its amount. The player already has his starting 100 gold. I need that 120 to be added to the 100 to make 220 gold. But I have absolutely no idea how to do this.
Any help that can be provided will be greatly appreciated. Thanks in advance.