• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Variable Question Income

Status
Not open for further replies.
Level 4
Joined
Apr 24, 2009
Messages
115
Hi everyone,

I am trying to figure out how to give a player periodic income based on if they own a hero of hero type and I am having trouble. Help? Any suggestions are appreciated.

- Lordrake
 
  • Tr
  • Events
    • Time - Every 10.00 seconds of game-time
  • Conditions
  • Actions
    • Player Group - Pick every player in (All players) and do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • (Life of Hero[(Player number of (Picked player))]) Greater than (0.41 - 0.05)
          • Then - Actions
            • Player - Add 20 to (Picked player)'s Current gold
          • Else - Actions
Hero[] is a Unit variable, that you have saved upon the creation of the hero for each respective player.
 
Level 4
Joined
Apr 24, 2009
Messages
115
  • Tr
  • Events
    • Time - Every 10.00 seconds of game-time
  • Conditions
  • Actions
    • Player Group - Pick every player in (All players) and do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • (Life of Hero[(Player number of (Picked player))]) Greater than (0.41 - 0.05)
          • Then - Actions
            • Player - Add 20 to (Picked player)'s Current gold
          • Else - Actions
Hero[] is a Unit variable, that you have saved upon the creation of the hero for each respective player.

I think I get it, thanks for the help.
 
Status
Not open for further replies.
Top