• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Please fix any bugs/leaks

Status
Not open for further replies.
Level 10
Joined
Jan 19, 2010
Messages
393
Hello HWS!
I got idea from my friend(and he didnt even no it :ogre_hurrhurr:) It took me some time but its completed. Why i didnt post it to Spells? Cause i am not sure about leaks. So i will be very happy if you help me with removing leaks and upgrading system. Right now it burns out all Destructibles, but it is just about adding types of destructibles to few "ands".
Thx for trying out and helping me fixing bugs/leaks.

http://www.hiveworkshop.com/forums/pastebin_data/iaj85v/_files/Firing%20Destructibles.w3x

EDIT: Sorry i have forgotten to post url xD
EDIT2: You can edit it how you want. Just say me, cause i would like to try out :)
 
Level 4
Joined
Jun 23, 2011
Messages
70
Alright:

I made an edit, adding several variables in order to, instead of simply removing the destructable, replace it with a burned version (trees). You'll need to add a condition to check whether the burning object is a tree or not, in order for the computer to know whether or not to create a burnt tree at that location.

Secondly, your system has one glitch: Because of the way you've triggered the fire to spread (although it is definitely the right way), the fire burns itself into isolated corners. Once it's there, since your fire is triggered to burn out only once it moves on to another tree, it remains on fire indefinitely. Although it's an unintended result, I actually really like the effect - it makes the burnt sections appear almost to 'smolder'. However, the fire needs to end eventually. I took a stab at creating an end to the fire in the trigger "Burnout Check".

Burnout Check (is intended to) logs the number of trees burning every 3 seconds, and saves the last 5 logged values as integer variables (BurnTimer[1-5]). Theoretically, once the fire works its way down to the final isolated trees, the number of trees burning will stop changing. When the second trigger, "Total Burnout", encounters a point where all 6 of these integer variables have the same value (i.e., the number of trees burning has stopped changing), it will replace all burning trees with burnt models. You could probably add some timer to make them burn out one by one instead of all at once, if desired.

If you decide to keep the burnt model addition, I would also recommend adding variables to log the scaling value and variation number of the tree being burnt, and replace it with a burnt model of the same scale and variation from the palette of burnt models (it will be clearly marked).

All of your triggers are marked using either point or destructible based variables (which are reused), so I don't see anything that would leak badly. If you're horribly afraid of leaking, I would reccomend you ask the trigger moderator (or Spinnaker) to check it. The other option is to load and start the game before you go to bed, and check in the morning for any symptoms of extreme lag.

Other than that, great effect, and I will definitely be finding some excuse to steal this (and give you credit) for some map in the near future!

Edited Map Pastebin Link: http://www.hiveworkshop.com/forums/pastebin.php?id=jn0cpu
 
Last edited:
Level 4
Joined
Jun 23, 2011
Messages
70
Well, yeah, that's why I said you should add the check. You can set it so that the burnt tree will only replace actual trees. Just change Fix Fire to this:

  • Fix fire
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set RandomTreeGen = (Random integer number between 1 and 10)
      • Set Fire_Fix = (Units in (Entire map) matching ((Unit-type of (Matching unit)) Equal to Fire))
      • Unit Group - Pick every unit in Fire_Fix and do (Actions)
        • Loop - Actions
          • Set Fire_Fix_Pos = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Random destructible in (Region centered at Fire_Fix_Pos with size (75.00, 75.00))) Equal to Null_Destructible
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Destructible-type of (Picked destructible)) Equal to Summer Tree Wall
                • Then - Actions
                  • Set StumpLoc = (Position of (Picked unit))
                  • Unit Group - Remove (Picked unit) from Fire_Fix
                  • Unit - Remove (Picked unit) from the game
                  • Destructible - Create a Northrend Tree Wall at StumpLoc facing 0.00 with scale 1.00 and variation RandomTreeGen
                • Else - Actions
              • Unit Group - Remove (Picked unit) from Fire_Fix
              • Unit - Remove (Picked unit) from the game
            • Else - Actions
But it's only a suggestion - keep in mind you asked for ideas! Whether you choose to use them or not, I think your spell is pretty clever, and will be very useful to HWSers.
 
Status
Not open for further replies.
Top