Checking owner of hero gold amount

  • Thread starter Thread starter Bananskral
  • Start date Start date
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.
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)
Please help me, i dont know what type of condition i should use. Maybe a real? But how? :confused:
 
an idea

what you could do if u cant find a trigger condition for gold is do one for an item.

So as you go into the Tavern u buy a "room key" for the same gold and then run an easy trigger condition to see if u have ur room key.

If u wanted to make it cool, u could add charges to the room keys so u can pay for several nights stay all in one!

Hope this helps.

Peng-
 
Variables is your only solution. Lol just kidding. :)

You mean something like this?
(Player 1 (Red) Current gold) Greater than or equal to YourGold
That is Integer Comparision ( Player - Player Property )
 
There is an ability that is called "Charge Gold and Lumber"... Hard to use together with Select Hero though...
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    got it
  • The Helper The Helper:
    Happy Thursday!
  • The Helper The Helper:
    Check out the new Featured Content feature we apparently got with the forum software upgrade! https://www.thehelper.net/featured/
  • The Helper The Helper:
    Also on the bottom right side bar we now have a Trending Content Box!
    +1
  • The Helper The Helper:
    Not on the Headline News page just on the Forums page can we get that Featured and Trending on the home page?
  • Ghan Ghan:
    Since the home page is technically a forum, it now shows on all forum views. Still in the sidebar.
    +1
  • The Helper The Helper:
    Happy Friday! Hope everyone has a fantastic day and an even better weekend!
  • The Helper The Helper:
    Happy Sunday!
  • The Helper The Helper:
    I lovc that I can post webp and X links now! :)
  • The Helper The Helper:
    Happy Thursday!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1
  • The Helper The Helper:
    Guys just a heads up I am going to be shutting the site down soon. I am just waiting on the NUON people to decide whether they want to transfer forum data and keep the discord. My email is [email protected] for anyone that wants to keep in touch and I have a facebook too. I will make an official post later. Love you guys and will miss everyone!
    +1
  • V-SNES V-SNES:
    Sent a pm @The Helper

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top