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: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.
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 --------
- Events
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 - Conditions
- 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
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (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 - Conditions
- 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
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Custom script: call DestroyGroup(udg_HeatUnitGroup)
- Loop - Actions
- Custom script: call DestroyForce(udg_HeatPlayerGroup)
- Events
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))]
- Loop - Actions
- Leaderboard - Show (Last created leaderboard)
- -------- You can modify the HP-Factor in the main part of the system --------
- Custom script: call DestroyForce(udg_HeatPlayerGroup)
- Events
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 - Conditions
- 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
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (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 - Conditions
- 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
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Custom script: call DestroyGroup(udg_HeatUnitGroup)
- Loop - Actions
- Custom script: call DestroyForce(udg_HeatPlayerGroup)
- Events
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
- Events
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 --------
- Events
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 - Conditions
- 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
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (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 - Conditions
- 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
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Custom script: call DestroyGroup(udg_HeatUnitGroup)
- Loop - Actions
- Custom script: call DestroyForce(udg_HeatPlayerGroup)
- Events