• 🏆 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!

Fire Spread 1.2

  • Like
Reactions: Kam
What this does:
You burn one tree (by spell) and it starts to spread to more and more trees (or another destructibles on list). Those destructibles are going to lose HP over time and then it gets destroyed. I will maybe allow even units and buildings to catch on fire in a future.

PS: It can be very laggy sometimes.

Note: So i've decided i could upgrade it sometimes after all. Not much but some minor changes will come. You have all rights to use this and edit this! Just give credits to me and Spinnaker.

Please, let me know if you use this in your map. I want to try out :)

This man helped a lot Spinnaker


  • Initialising
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Var_Damage = 1.00
      • -------- Damage dealt to burning destructible every tick of "Burned out" --------
      • Set Var_Timer = 20.00
      • -------- Time one destructible is in fire. (in seconds) --------
      • Set Var_Range = 500.00
      • -------- Range in which fire can spread. --------
      • Set Var_Catch_Chance = 20
      • -------- Sets chance of fire catch ( % ) --------
      • -------- ############################################################## --------
      • -------- Special effect is now that big fire circle followed by explosion sound --------
      • Set Var_Special_Effect_Toggle = True
      • -------- Toggles if can special effect appear --------
      • Set Var_Special_Effect_Chance = 5
      • -------- Sets chance of special effect appear ( % ) --------
      • Set Fire_Model = Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
      • -------- Set model of fire (Right now it is fire, but your trees can even burn by blue fire or by explosion =) ) --------
      • Set Fire_Special_Effect = Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
      • -------- Sets special effect --------
      • Visibility - Disable black mask
      • Visibility - Disable fog of war
  • Fire
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Eager Fire (Naisha)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Fire_Integer[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on Burned out <gen>
        • Else - Actions
      • Set Fire_Integer[1] = (Fire_Integer[1] + 1)
      • Set Fire_Integer[2] = (Fire_Integer[2] + 1)
      • Set Fire_Damage[Fire_Integer[2]] = Var_Damage
      • Set Fire_Timer[Fire_Integer[2]] = Var_Timer
      • Set Fire_Destructible[Fire_Integer[2]] = (Target destructible of ability being cast)
      • Set Fire_Point = (Position of Fire_Destructible[Fire_Integer[2]])
      • Special Effect - Create a special effect at Fire_Point using Fire_Model
      • Set Fire_Effect[Fire_Integer[2]] = (Last created special effect)
      • Set Fire_Boolean[Fire_Integer[2]] = True
      • Custom script: call RemoveLocation (udg_Fire_Point)
  • Burned out
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Fire_Integer[3]) from 1 to Fire_Integer[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Fire_Boolean[Fire_Integer[3]] Equal to True
            • Then - Actions
              • Destructible - Set life of Fire_Destructible[Fire_Integer[3]] to ((Current life of Fire_Destructible[Fire_Integer[3]]) - Fire_Damage[Fire_Integer[3]])
              • Set Fire_Timer[Fire_Integer[3]] = (Fire_Timer[Fire_Integer[3]] - 0.10)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Fire_Destructible[Fire_Integer[3]] is dead) Equal to True
                      • Fire_Timer[Fire_Integer[3]] Less than or equal to 0.00
                • Then - Actions
                  • Set Fire_Boolean[Fire_Integer[3]] = False
                  • Set Fire_Timer[Fire_Integer[3]] = 0.00
                  • Set Fire_Destructible[Fire_Integer[3]] = No destructible
                  • Special Effect - Destroy Fire_Effect[Fire_Integer[3]]
                  • Set Fire_Integer[1] = (Fire_Integer[1] - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Fire_Integer[1] Equal to 0
                    • Then - Actions
                      • Set Fire_Integer[2] = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
                • Else - Actions
                  • -------- Here are catching on fire another trees --------
                  • Set Fire_Chance[Fire_Integer[3]] = (Random integer number between 1 and 100)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Current life of Fire_Destructible[Fire_Integer[3]]) Less than ((Max life of Fire_Destructible[Fire_Integer[3]]) x 0.50)
                      • Fire_Chance[Fire_Integer[3]] Less than or equal to Var_Catch_Chance
                    • Then - Actions
                      • Set Temp_point = (Position of Fire_Destructible[Fire_Integer[3]])
                      • Set Temp_region = (Region centered at Temp_point with size (Var_Range, Var_Range))
                      • Set Temp_tree = (Random destructible in Temp_region matching ((((Matching destructible) is dead) Equal to False) and ((Matching destructible) Not equal to Fire_Destructible[Fire_Integer[3]])))
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Or - Any (Conditions) are true
                            • Conditions
                              • (Destructible-type of Temp_tree) Equal to Ashenvale Tree Wall
                              • (Destructible-type of Temp_tree) Equal to Ashenvale Canopy Tree
                              • (Destructible-type of Temp_tree) Equal to Barrens Canopy Tree
                              • (Destructible-type of Temp_tree) Equal to Barrens Tree Wall
                              • (Destructible-type of Temp_tree) Equal to Black Citadel Tree Wall
                              • (Destructible-type of Temp_tree) Equal to Cityscape Fall Tree Wall
                              • (Destructible-type of Temp_tree) Equal to Cityscape Snowy Tree Wall
                              • (Destructible-type of Temp_tree) Equal to Cityscape Summer Tree Wall
                              • (Destructible-type of Temp_tree) Equal to Cityscape Winter Tree Wall
                              • (Destructible-type of Temp_tree) Equal to Dalaran Ruins Tree Wall
                              • (Destructible-type of Temp_tree) Equal to Dungeon Tree Wall
                              • (Destructible-type of Temp_tree) Equal to Felwood Tree Wall
                              • (Destructible-type of Temp_tree) Equal to Felwood Canopy Tree
                              • (Destructible-type of Temp_tree) Equal to Icecrown Tree Wall
                              • (Destructible-type of Temp_tree) Equal to Icecrown Canopy Tree
                              • (Destructible-type of Temp_tree) Equal to Northrend Canopy Tree
                              • (Destructible-type of Temp_tree) Equal to Fall Tree Wall
                              • (Destructible-type of Temp_tree) Equal to Summer Tree Wall
                              • (Destructible-type of Temp_tree) Equal to Snowy Tree Wall
                              • (Destructible-type of Temp_tree) Equal to Winter Tree Wall
                              • (Destructible-type of Temp_tree) Equal to Northrend Tree Wall
                              • (Destructible-type of Temp_tree) Equal to Snowy Tree Wall
                              • (Destructible-type of Temp_tree) Equal to Outland Tree Wall
                              • (Destructible-type of Temp_tree) Equal to Ruins Tree Wall
                              • (Destructible-type of Temp_tree) Equal to Ruins Canopy Tree
                              • (Destructible-type of Temp_tree) Equal to Underground Tree Wall
                              • (Destructible-type of Temp_tree) Equal to Village Tree Wall
                        • Then - Actions
                          • Set Fire_Integer[1] = (Fire_Integer[1] + 1)
                          • Set Fire_Integer[2] = (Fire_Integer[2] + 1)
                          • Set Fire_Damage[Fire_Integer[2]] = Var_Damage
                          • Set Fire_Destructible[Fire_Integer[2]] = Temp_tree
                          • Set Fire_Timer[Fire_Integer[2]] = Var_Timer
                          • Set Fire_Point = (Position of Fire_Destructible[Fire_Integer[2]])
                          • Special Effect - Create a special effect at Fire_Point using Fire_Model
                          • Set Fire_Effect[Fire_Integer[2]] = (Last created special effect)
                          • Set Fire_Boolean[Fire_Integer[2]] = True
                          • Custom script: call RemoveLocation (udg_Fire_Point)
                        • Else - Actions
                      • Set Fire_Chance[Fire_Integer[3]] = (Random integer number between 1 and 100)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • And - All (Conditions) are true
                            • Conditions
                              • Var_Special_Effect_Toggle Equal to True
                              • Fire_Chance[Fire_Integer[3]] Less than or equal to Var_Special_Effect_Chance
                        • Then - Actions
                          • Special Effect - Create a special effect at Temp_point using Fire_Special_Effect
                          • Special Effect - Destroy (Last created special effect)
                        • Else - Actions
                      • Set Fire_Chance[Fire_Integer[3]] = 0
                      • Custom script: call RemoveRect (udg_Temp_region)
                      • Custom script: call RemoveLocation (udg_Temp_point)
                    • Else - Actions
            • Else - Actions



1.2 Added more variables for settings and list of destructibles that could burn
1.1 Added variables for easy setting
1.0 First version


Keywords:
Fire, Spread, Forest, Inferno, Destructibles
Contents

Eager Fire (Map)

Reviews
Approved Good and interesting system. It could benefit from having configurable values fo burn duration, burn chance etc. The timer could run a bit less often, it doesn't need to run every 0.05 seconds.

Moderator

M

Moderator

Reviewed by Maker, Fire Spread 1.0, 8th Apr 2012

Approved

Good and interesting system.

It could benefit from having configurable values fo burn duration,
burn chance etc.
The timer could run a bit less often, it doesn't need to run every 0.05 seconds.
 
Level 10
Joined
Jan 19, 2010
Messages
393

  • Initialising
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Var_Damage = 1.00
      • -------- Damage dealt to burning destructible every tick of "Burned out" --------
      • Set Var_Timer = 5.00
      • -------- Time one destructible is in fire. (in seconds) --------
      • Set Var_Range = 500.00
      • -------- Range in which fire can spread. --------
      • Visibility - Disable black mask
      • Visibility - Disable fog of war
  • Fire
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Eager Fire (Naisha)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Fire_Integer[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on Burned out <gen>
        • Else - Actions
      • Set Fire_Integer[1] = (Fire_Integer[1] + 1)
      • Set Fire_Integer[2] = (Fire_Integer[2] + 1)
      • Set Fire_Damage[Fire_Integer[2]] = Var_Damage
      • Set Fire_Timer[Fire_Integer[2]] = Var_Timer
      • Set Fire_Destructible[Fire_Integer[2]] = (Target destructible of ability being cast)
      • Set Fire_SfxString[Fire_Integer[2]] = Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
      • Set Fire_Bonusfx[Fire_Integer[2]] = Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
      • Set Fire_Point = (Position of Fire_Destructible[Fire_Integer[2]])
      • Special Effect - Create a special effect at Fire_Point using Fire_SfxString[Fire_Integer[2]]
      • Set Fire_Effect[Fire_Integer[2]] = (Last created special effect)
      • Set Fire_Boolean[Fire_Integer[2]] = True
      • Custom script: call RemoveLocation (udg_Fire_Point)
  • Burned out
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Fire_Integer[3]) from 1 to Fire_Integer[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Fire_Boolean[Fire_Integer[3]] Equal to True
            • Then - Actions
              • Destructible - Set life of Fire_Destructible[Fire_Integer[3]] to ((Current life of Fire_Destructible[Fire_Integer[3]]) - Fire_Damage[Fire_Integer[3]])
              • Set Fire_Timer[Fire_Integer[3]] = (Fire_Timer[Fire_Integer[3]] - 0.10)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Fire_Destructible[Fire_Integer[3]] is dead) Equal to True
                      • Fire_Timer[Fire_Integer[3]] Less than or equal to 0.00
                • Then - Actions
                  • Set Fire_Boolean[Fire_Integer[3]] = False
                  • Set Fire_Timer[Fire_Integer[3]] = 0.00
                  • Set Fire_Destructible[Fire_Integer[3]] = No destructible
                  • Set Fire_SfxString[Fire_Integer[3]] = <Empty String>
                  • Set Fire_Bonusfx[Fire_Integer[3]] = <Empty String>
                  • Special Effect - Destroy Fire_Effect[Fire_Integer[3]]
                  • Set Fire_Integer[1] = (Fire_Integer[1] - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Fire_Integer[1] Equal to 0
                    • Then - Actions
                      • Set Fire_Integer[2] = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
                • Else - Actions
                  • Set Fire_Chance[Fire_Integer[3]] = (Random integer number between 1 and 10)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Current life of Fire_Destructible[Fire_Integer[3]]) Less than ((Max life of Fire_Destructible[Fire_Integer[3]]) x 0.50)
                      • Fire_Chance[Fire_Integer[3]] Equal to 1
                    • Then - Actions
                      • Set Temp_point = (Position of Fire_Destructible[Fire_Integer[3]])
                      • Set Temp_region = (Region centered at Temp_point with size (Var_Range, Var_Range))
                      • Set Temp_tree = (Random destructible in Temp_region matching ((((Matching destructible) is dead) Equal to False) and ((Matching destructible) Not equal to Fire_Destructible[Fire_Integer[3]])))
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Temp_tree Not equal to No destructible
                        • Then - Actions
                          • Set Fire_Integer[1] = (Fire_Integer[1] + 1)
                          • Set Fire_Integer[2] = (Fire_Integer[2] + 1)
                          • Set Fire_Damage[Fire_Integer[2]] = Var_Damage
                          • Set Fire_Destructible[Fire_Integer[2]] = Temp_tree
                          • Set Fire_Timer[Fire_Integer[2]] = Var_Timer
                          • Set Fire_SfxString[Fire_Integer[2]] = Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
                          • Set Fire_Bonusfx[Fire_Integer[2]] = Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
                          • Set Fire_Point = (Position of Fire_Destructible[Fire_Integer[2]])
                          • Special Effect - Create a special effect at Fire_Point using Fire_SfxString[Fire_Integer[2]]
                          • Set Fire_Effect[Fire_Integer[2]] = (Last created special effect)
                          • Set Fire_Boolean[Fire_Integer[2]] = True
                          • Custom script: call RemoveLocation (udg_Fire_Point)
                        • Else - Actions
                      • Set Fire_Chance[Fire_Integer[3]] = (Random integer number between 1 and 10)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Fire_Chance[Fire_Integer[3]] Equal to 10
                        • Then - Actions
                          • Special Effect - Create a special effect at Temp_point using Fire_Bonusfx[Fire_Integer[3]]
                          • Special Effect - Destroy (Last created special effect)
                        • Else - Actions
                      • Set Fire_Chance[Fire_Integer[3]] = 0
                      • Custom script: call RemoveRect (udg_Temp_region)
                      • Custom script: call RemoveLocation (udg_Temp_point)
                    • Else - Actions
            • Else - Actions

You have full rights to edit this and use it! I won't update this cause i don't know anymore how it works! If you make better version just upload it!

EDIT: Due to comment of MOD I'll try to rework it, cause right now i have nothing to do.
EDIT2: OK Updated
 
Last edited:
Top