B
Bananskral
Guest
Im making a roleplaying game where people can sleep overnight at a tavern. It works, though if the hero doesnt have the gold, it runs the trigger healing the unit. How can i make a condition checking if the owner of a unit using a service with a circle of power has the right amount of gold. Please dont tell me to use variables. Heres my code.
Please help me, i dont know what type of condition i should use. Maybe a real? But how? 
Code:
Tavern sleep
Events
Unit - A unit comes within 2.00 of Tavern Sleep Overnight 0029 <gen>
Conditions
Actions
Unit - Pause (Triggering unit)
Unit - Make (Triggering unit) Sleep when unprovoked
Wait 8.00 seconds
Unit - Wake up (Triggering unit)
Game - Display to (All players matching ((Owner of (Triggering unit)) Equal to (Matching player))) for 5.00 seconds the text: You rested at the t...
Player - Add -25 to (Owner of (Triggering unit)) Current gold
Unit - Set mana of (Triggering unit) to 100.00%
Unit - Set life of (Triggering unit) to 100.00%
Unit - Unpause (Triggering unit)


