• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

[Spell] Destructible bug

Status
Not open for further replies.
Level 8
Joined
Nov 9, 2011
Messages
324
why isnt this working it wont even find the dying destructible dunno why.
  • Planks
    • Events
      • Destructible - A destructible within (Playable map area) dies
    • Conditions
      • (Destructible-type of (Dying destructible)) Equal to Summer Tree Wall (custom)
    • Actions
      • Set tempDestructible = (Dying destructible)
      • For each (Integer tempInt) from 1 to Tree_Counter, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • tempDestructible Equal to Tree[tempInt]
            • Then - Actions
              • Game - Display to (All players) the text: asdf
              • Set tempPoint = (Position of Tree[tempInt])
              • Item - Create Tome of Experience at tempPoint
              • Custom script: call RemoveLocation (udg_tempPoint)
            • Else - Actions
 
Level 8
Joined
Nov 9, 2011
Messages
324
The variable Tree (with arrays). Have you stored any destructable inside that variable? The problem might be there
Please show any related triggers.

Edit:
I think this thread should be moved to Triggers & Scripts.


  • Items Var
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Destructible - Pick every destructible in (Playable map area) 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 Summer Tree Wall
              • ((Picked destructible) is alive) Equal to True
            • Then - Actions
              • Set Tree_Counter = (Tree_Counter + 1)
              • Set Tree_CreateItem[Tree_Counter] = 0
              • Game - Display to (All players) the text: (String(Tree_Counter))
              • Set Tree[Tree_Counter] = (Picked destructible)
            • Else - Actions
      • Trigger - Turn on Planks <gen>


this is what arrays all trees but even if they are arrayed it wont find when i use event - a destructible dies
 
Level 25
Joined
May 11, 2007
Messages
4,652
Well...
In the init trigger, you check (Destructible-type of (Picked destructible)) Equal to Summer Tree Wall

and in the second you check (Destructible-type of (Dying destructible)) Equal to Summer Tree Wall (custom)

that's two different tree types, so no wonder your "dying" trigger doesn't work. :)
 
Level 13
Joined
Mar 29, 2012
Messages
530
Also, are you intending to drop an item when a specific type of tree dies?
If so, you might don't need that 'if' block.
Just keep these
  • Game - Display to (All players) the text: asdf
  • Set tempPoint = (Position of Tree[tempInt])
  • Item - Create Tome of Experience at tempPoint
  • Custom script: call RemoveLocation (udg_tempPoint)
and delete the others.
 
Level 8
Joined
Nov 9, 2011
Messages
324
Also, are you intending to drop an item when a specific type of tree dies?
If so, you might don't need that 'if' block.
Just keep these
  • Game - Display to (All players) the text: asdf
  • Set tempPoint = (Position of Tree[tempInt])
  • Item - Create Tome of Experience at tempPoint
  • Custom script: call RemoveLocation (udg_tempPoint)
and delete the others.

new trigger man and thanks for help


  • Planks
    • Events
      • Destructible - A destructible within (Playable map area) dies
    • Conditions
      • (Destructible-type of (Dying destructible)) Equal to TreeType
    • Actions
      • Game - Display to (All players) the text: dead
      • Set tempPoint = (Position of (Dying destructible))
      • Item - Create DroppedItems_Plank at tempPoint
      • Set tempItem = (Last created item)
      • Item - Set charges remaining in tempItem to (Random integer number between 1 and 3)
      • Custom script: call RemoveLocation (udg_tempPoint)
      • Set tempItem = No item

and it works fine
 
Status
Not open for further replies.
Top