I'm looking for a way to have object 1 assign a random value to property "Gold". If the property value turns out to be higher than 10, I have a Property Sensor to check for that, and if it's true, it will activate a Message Actuator with the subject "Add Gold" and the property "Gold" as the body type (Not text).
In my head, this will embed the property "Gold" into the message "Add Gold" that is being send out to other objects.
Now, in object 2, I have a Message Sensor that looks for a message called "Add Gold". This is then connected to a Property Actuator which will add the message to the property "Total Gold".
The problem here is that this does not seem to work, and I'm not sure what I'm doing wrong.
Object 1 logic that will embed the value "Gold" to a message and send it to Object 2.
Object 2 logic that will look for added gold message, and add the value in the message body to it's property "Total Gold".
I have the information sent to a Game Controller (Empty object) which handles all important global information so far. On my HUD screen, I have a counter working as a total resources counter, which includes among others, the gold values I want to send. The HUD counter then copies the property value "Total Gold" from the game controller, but nothing appear on the HUD (The counter starts, and stays at a -1 value, even after picking up the resource boxes (the grey ones being dropped by the yellow cubes)