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

Destructable Death Not Tracking? -less than 64 in region

Status
Not open for further replies.
Level 6
Joined
Sep 11, 2006
Messages
172
  • Destroy UnLond
    • Events
      • Destructible - A destructible within Region 346 <gen> dies
    • Conditions
      • (Destructible-type of (Dying destructible)) Equal to |cff7fffd4Uncommon Londsdale|r
    • Actions
      • Game - Display to (All players) the text: This is a test mess...
      • Set LondsdaleDrop = (Position of (Dying destructible))
      • Set Dice[1] = (Random integer number between 1 and 5)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Dice[1] Equal to 1
        • Then - Actions
          • Item - Create Uncommon Londsdale Compound at LondsdaleDrop
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Dice[1] Equal to 2
        • Then - Actions
          • Item - Create Uncommon Londsdale Compound at LondsdaleDrop
          • Item - Create Uncommon Londsdale Compound at LondsdaleDrop
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Dice[1] Equal to 3
        • Then - Actions
          • Item - Create Uncommon Londsdale Compound at LondsdaleDrop
          • Item - Create Uncommon Londsdale Compound at LondsdaleDrop
          • Item - Create Uncommon Londsdale Compound at LondsdaleDrop
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Dice[1] Equal to 4
        • Then - Actions
          • Item - Create Uncommon Londsdale Compound at LondsdaleDrop
          • Item - Create Uncommon Londsdale Compound at LondsdaleDrop
          • Item - Create Uncommon Londsdale Compound at LondsdaleDrop
          • Item - Create Uncommon Londsdale Compound at LondsdaleDrop
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Dice[1] Equal to 5
        • Then - Actions
          • Item - Create Uncommon Londsdale Compound at LondsdaleDrop
          • Item - Create Uncommon Londsdale Compound at LondsdaleDrop
          • Item - Create Uncommon Londsdale Compound at LondsdaleDrop
          • Item - Create Uncommon Londsdale Compound at LondsdaleDrop
          • Item - Create Uncommon Londsdale Compound at LondsdaleDrop
        • Else - Actions
          • Do nothing
      • Custom script: call RemoveLocation(udg_LondsdaleDrop)
      • Wait 3600.00 seconds
      • Destructible - Resurrect (Dying destructible) with (Max life of (Dying destructible)) life and Show birth animation
This trigger is not firing. There are less than 64 destructables in the region it monitors.

Thanks for any help.
 
Level 5
Joined
Nov 30, 2012
Messages
200
That's bizarre; judging by the trigger, it should work. If it's agreeable with you, can you post the map into the pastebin?

P.S. The Do nothing function is a waste of space and unnecessary.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Are you maybe having the same problem as the person in this thread?
In his map, he has over 6144 destructables (which is the default limit, but can be broken with JNGP).
It's not so much about how many destructables are in the region, it's about how many there are in the map. Going over the 6144-limit may break some stuff, such as "Destructable dies" (not for all destructables though).
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
With over 7500 destructibles in my map, this still seemed to work:
  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Destructible - Pick every destructible in Region 000 <gen> and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Destructible-type of (Picked destructible)) Equal to Cage
            • Then - Actions
              • Trigger - Add to Kill <gen> the event (Destructible - (Picked destructible) dies)
            • Else - Actions
  • Kill
    • Events
    • Conditions
    • Actions
      • Set TempLoc1 = (Position of (Dying destructible))
      • For each (Integer A) from 1 to (Random integer number between 1 and 5), do (Actions)
        • Loop - Actions
          • Item - Create Tome of Experience at TempLoc1
      • Custom script: call RemoveLocation(udg_TempLoc1)
      • Custom script: set udg_TempLoc1 = null
      • Wait 3600.00 seconds
      • Destructible - Resurrect (Dying destructible) with (Max life of (Dying destructible)) life and Show birth animation
Note: the variable here is "TempLoc1" because creating a new variable that will only be temporary is stupid.
I recommend using 3 TempLoc-variables for all locations that are temporary (remove all other location variables you have, and don't create any new ones unless they're constants).
Also, the loop makes things easier (instead of the set random variable / ITE's).
And never use "Do Nothing".
 
Status
Not open for further replies.
Top