System Heat System [GUI]

Immolation

Member
Reaction score
20
Heat System [GUI]



A simple heat system that checks periodically a unit's heat. If that heat is lower than the average amount and the unit is in the wilderness, it will lose life. If otherwise the heat is higher than average and the unit is near a heat source, it will gain life.

Customizables:
-Seconds between heat change.
-Heat Gain/Loss each interval.
-Heat Max/Min.
-Life gained(or lost) while gaining or losing heat.
-Units that are affected.
-Buff gave through Bonfire Ability.
-Systems type(using Lumber, Leaderboard or Food)

Changelog
:
v1.2
-Added Leaderboard method.
-Added Food method.
-Updated Lumber method.

v1.1
-Now works with buffs instead of many "Pick every unit and..." and points, making the whole system much lagless and more efficient.

v1.01a
-Fixed a tiny leak.

v1.01
-Removed all the "Do Nothings".
-Fixed leaks.
-Configuration triggers are in the initialization trigger now.

Lumber System:
Trigger:
  • Initializiation HS Lumber
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- Amount of heat that you gain when standing near Bonfire --------
      • Set HeatGain = 1
      • -------- Amount of heat that you lose when not near a bonfire --------
      • Set HeatLose = -1
      • -------- Maximum amount of heat --------
      • Set HeatMax = 38
      • -------- Minimum amount of heat --------
      • Set HeatMin = 20
      • -------- Average amount between minimum and maximum heat --------
      • Set HeatAverage = ((HeatMax + HeatMin) / 2)
      • -------- Area in which units gain heat when standing near a Bonfire --------
      • Set HeatArea = 300.00
      • -------- Bonfire buff-type --------
      • Set HeatBuff = Bonfire Heat
      • -------- Hero unit-type(s) --------
      • Set HeatHero[1] = Blood Mage
      • -------- Choose true if you want units to lose life when their heat is lower than normal and not near a bonfire --------
      • Set HeatTakeDamage = True
      • -------- Choose true if you want units to gain life when their heat is higher than normal and near a bonfire --------
      • Set HeatGainLife = True
      • -------- You can modify the HP-Factor in the main part of the system --------
Trigger:
  • HS Lumber
    • Events
      • Time - Every 4.00 seconds of game time
    • Conditions
    • Actions
      • Set HeatPlayerGroup = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
      • Player Group - Pick every player in HeatPlayerGroup and do (Actions)
        • Loop - Actions
          • -------- HPFactor --------
          • Set HeatHPFactor = (Real(((((Picked player) Current lumber) - HeatAverage) / 2)))
          • Set HeatUnitGroup = (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to (Picked player)) and ((Unit-type of (Matching unit)) Equal to HeatHero[1])))
          • Unit Group - Pick every unit in HeatUnitGroup and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) has buff HeatBuff) Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked player) Current lumber) Less than HeatMax
                    • Then - Actions
                      • -------- Add heat since it is within range of a bonfire --------
                      • Player - Add HeatGain to (Picked player) Current lumber
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked player) Current lumber) Greater than or equal to HeatAverage
                      • HeatGainLife Equal to True
                    • Then - Actions
                      • -------- Add life too since the unit heat is higher than average --------
                      • Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) + HeatHPFactor)%
                    • Else - Actions
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked player) Current lumber) Greater than HeatMin
                    • Then - Actions
                      • -------- Reduce heat since it is not within range of a bonfire --------
                      • Player - Add HeatLose to (Picked player) Current lumber
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • HeatTakeDamage Equal to True
                      • ((Picked player) Current lumber) Less than or equal to HeatAverage
                    • Then - Actions
                      • -------- Reduce life since it's not within range of a bonfire --------
                      • Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) + HeatHPFactor)%
                    • Else - Actions
          • Custom script: call DestroyGroup(udg_HeatUnitGroup)
      • Custom script: call DestroyForce(udg_HeatPlayerGroup)
Leaderboard Method:
Trigger:
  • Initialization HS Leaderboard
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- Amount of heat that you gain when standing near Bonfire --------
      • Set HeatGain = 1
      • -------- Amount of heat that you lose when not near a bonfire --------
      • Set HeatLose = -1
      • -------- Maximum amount of heat --------
      • Set HeatMax = 38
      • -------- Minimum amount of heat --------
      • Set HeatMin = 20
      • -------- Average amount between minimum and maximum heat --------
      • Set HeatAverage = ((HeatMax + HeatMin) / 2)
      • -------- Area in which units gain heat when standing near a Bonfire --------
      • Set HeatArea = 300.00
      • -------- Bonfire buff-type --------
      • Set HeatBuff = Bonfire Heat
      • -------- Hero unit-type(s) --------
      • Set HeatHero[1] = Blood Mage
      • -------- Choose true if you want units to lose life when their heat is lower than normal and not near a bonfire --------
      • Set HeatTakeDamage = True
      • -------- Choose true if you want units to gain life when their heat is higher than normal and near a bonfire --------
      • Set HeatGainLife = True
      • Leaderboard - Create a leaderboard for (All players) titled Body Temperature
      • Set HeatPlayerGroup = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
      • Player Group - Pick every player in HeatPlayerGroup and do (Actions)
        • Loop - Actions
          • Set HeatQuantity[(Player number of (Picked player))] = 29
          • Leaderboard - Add (Picked player) to (Last created leaderboard) with label (P + (Name of (Picked player))) and value HeatQuantity[(Player number of (Picked player))]
      • Leaderboard - Show (Last created leaderboard)
      • -------- You can modify the HP-Factor in the main part of the system --------
      • Custom script: call DestroyForce(udg_HeatPlayerGroup)
Trigger:
  • HS Leaderboard
    • Events
      • Time - Every 4.00 seconds of game time
    • Conditions
    • Actions
      • Set HeatPlayerGroup = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
      • Player Group - Pick every player in HeatPlayerGroup and do (Actions)
        • Loop - Actions
          • -------- HPFactor --------
          • Set HeatHPFactor = (Real(((HeatQuantity[(Player number of (Picked player))] - HeatAverage) / 2)))
          • Set HeatUnitGroup = (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to (Picked player)) and ((Unit-type of (Matching unit)) Equal to HeatHero[1])))
          • Unit Group - Pick every unit in HeatUnitGroup and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) has buff HeatBuff) Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • HeatQuantity[(Player number of (Picked player))] Less than HeatMax
                    • Then - Actions
                      • -------- Add heat since it is within range of a bonfire --------
                      • Set HeatQuantity[(Player number of (Picked player))] = (HeatQuantity[(Player number of (Picked player))] + 1)
                      • Leaderboard - Change the value for (Picked player) in (Last created leaderboard) to HeatQuantity[(Player number of (Picked player))]
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • HeatQuantity[(Player number of (Picked player))] Greater than or equal to HeatAverage
                      • HeatGainLife Equal to True
                    • Then - Actions
                      • -------- Add life too since the unit heat is higher than average --------
                      • Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) + HeatHPFactor)%
                    • Else - Actions
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • HeatQuantity[(Player number of (Picked player))] Greater than HeatMin
                    • Then - Actions
                      • -------- Reduce heat since it is not within range of a bonfire --------
                      • Set HeatQuantity[(Player number of (Picked player))] = (HeatQuantity[(Player number of (Picked player))] - 1)
                      • Leaderboard - Change the value for (Picked player) in (Last created leaderboard) to HeatQuantity[(Player number of (Picked player))]
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • HeatTakeDamage Equal to True
                      • HeatQuantity[(Player number of (Picked player))] Less than or equal to HeatAverage
                    • Then - Actions
                      • -------- Reduce life since it's not within range of a bonfire --------
                      • Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) + HeatHPFactor)%
                    • Else - Actions
          • Custom script: call DestroyGroup(udg_HeatUnitGroup)
      • Custom script: call DestroyForce(udg_HeatPlayerGroup)
Trigger:
  • HS LB Leave
    • Events
      • Player - Player 1 (Red) leaves the game
      • Player - Player 2 (Blue) leaves the game
      • Player - Player 3 (Teal) leaves the game
      • Player - Player 4 (Purple) leaves the game
      • Player - Player 5 (Yellow) leaves the game
      • Player - Player 6 (Orange) leaves the game
      • Player - Player 7 (Green) leaves the game
      • Player - Player 8 (Pink) leaves the game
      • Player - Player 9 (Gray) leaves the game
      • Player - Player 10 (Light Blue) leaves the game
      • Player - Player 11 (Dark Green) leaves the game
      • Player - Player 12 (Brown) leaves the game
    • Conditions
    • Actions
      • Leaderboard - Remove (Triggering player) from (Last created leaderboard)
      • Set HeatQuantity[(Player number of (Triggering player))] = 0
Food Method:
Trigger:
  • Initializiation HS Food
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- Amount of heat that you gain when standing near Bonfire --------
      • Set HeatGain = 1
      • -------- Amount of heat that you lose when not near a bonfire --------
      • Set HeatLose = -1
      • -------- Maximum amount of heat --------
      • Set HeatMax = 38
      • -------- Minimum amount of heat --------
      • Set HeatMin = 20
      • -------- Average amount between minimum and maximum heat --------
      • Set HeatAverage = ((HeatMax + HeatMin) / 2)
      • -------- Area in which units gain heat when standing near a Bonfire --------
      • Set HeatArea = 300.00
      • -------- Bonfire buff-type --------
      • Set HeatBuff = Bonfire Heat
      • -------- Hero unit-type(s) --------
      • Set HeatHero[1] = Blood Mage
      • -------- Choose true if you want units to lose life when their heat is lower than normal and not near a bonfire --------
      • Set HeatTakeDamage = True
      • -------- Choose true if you want units to gain life when their heat is higher than normal and near a bonfire --------
      • Set HeatGainLife = True
      • -------- You can modify the HP-Factor in the main part of the system --------
Trigger:
  • HS Food
    • Events
      • Time - Every 4.00 seconds of game time
    • Conditions
    • Actions
      • Set HeatPlayerGroup = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
      • Player Group - Pick every player in HeatPlayerGroup and do (Actions)
        • Loop - Actions
          • -------- HPFactor --------
          • Set HeatHPFactor = (Real(((((Picked player) Food cap) - HeatAverage) / 2)))
          • Set HeatUnitGroup = (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to (Picked player)) and ((Unit-type of (Matching unit)) Equal to HeatHero[1])))
          • Unit Group - Pick every unit in HeatUnitGroup and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) has buff HeatBuff) Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked player) Food cap) Less than HeatMax
                    • Then - Actions
                      • -------- Add heat since it is within range of a bonfire --------
                      • Player - Add HeatGain to (Picked player) Food cap
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked player) Food cap) Greater than or equal to HeatAverage
                      • HeatGainLife Equal to True
                    • Then - Actions
                      • -------- Add life too since the unit heat is higher than average --------
                      • Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) + HeatHPFactor)%
                    • Else - Actions
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked player) Food cap) Greater than HeatMin
                    • Then - Actions
                      • -------- Reduce heat since it is not within range of a bonfire --------
                      • Player - Add HeatLose to (Picked player) Food cap
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked player) Food cap) Less than or equal to HeatAverage
                      • HeatTakeDamage Equal to True
                    • Then - Actions
                      • -------- Reduce life since it's not within range of a bonfire --------
                      • Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) + HeatHPFactor)%
                    • Else - Actions
          • Custom script: call DestroyGroup(udg_HeatUnitGroup)
      • Custom script: call DestroyForce(udg_HeatPlayerGroup)
 

Attachments

  • Heat System v1.2.w3x
    85.5 KB · Views: 210

Azlier

Old World Ghost
Reaction score
461
For starters, you could remove all the Do Nothings.

You should also have the customizing variables in another trigger that runs on Map Initialization. Two variables for the Bonfire unit type and the hero type would be nice, too.
 

Romek

Super Moderator
Reaction score
963
Describe what it does?

> Anyone who gets an idea for screenshots gets +rep!
This probably doesn't need a screenshot.

> I used the SC3 map for previewing the system, I hope that it'll be okay and I'll not get killed >.<
No, you won't get killed. :)
 

Romek

Super Moderator
Reaction score
963
You can remove the two lines I quoted now. :p
Spoiler abuse isn't nice.

Could you post the 'Init' trigger?

Also, you don't destroy HeatUnitGroup[3].
 

mordocai

New Member
Reaction score
17
anyway to make this apply to only a certain player when he/she uses a hero, or if in custom race only apply to hero/units?
 

Immolation

Member
Reaction score
20
This could work with more than 1 unit, but since we can't measure all the unit temperatures as lumber we just make it work with one :):D
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
589
I suggest making this a custom player variable, and having it work as a floating text somewhere.

Or at least add some secondary method of this, I like my lumber.
 

Immolation

Member
Reaction score
20
Well, most maps don't use lumber anyway, and mostly are RPGs, which I developed this system for.

EDIT: I might however develop a multiboard later, we'll see...
 

Azlier

Old World Ghost
Reaction score
461
>Well, most maps don't use lumber anyway
I've only seen a few maps that don't use lumber.
 

Immolation

Member
Reaction score
20
BUMP!

Update v1.2!

-Added 2 new ways for possible heat systems: one with a Leaderboard and another using food.
-Optimized Lumber method. ;)

What does this need to get approved?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top