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

Couple questions

Status
Not open for further replies.
Level 4
Joined
Mar 27, 2009
Messages
66
1. what would be the best way to trigger it so when a destructable like a tree dies...it will create a item

2. how would i make it so that if trees spawn on ice terrain it will remove them?
 
Level 13
Joined
Sep 14, 2008
Messages
1,407
  • Trigger
    • Event
      • Destructible - A destructible within (Playable map area) dies
      • Condition
      • Action
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • 'IF'-Condition
            • (Destructible-type of (Dying destructible)) equal YourTree
          • 'THEN'-Action
            • Item - Create YourItem at (Position of (Dying destructible))
          • 'ELSE'-Action
 
Level 4
Joined
Mar 27, 2009
Messages
66
yea, i tried that already it didn't work...currently i have

event
Unit is issued a order targeting an object

Condition
Destructible-type of (Target destructible of issued order)) equal to snowy tree wall

Action
Wait until ((( Target destructible of issued order) is dead) equal to true), checking every 0.10 seconds
Item - Create item Stick at (postion of (target destructible of issued order))


but that can be abused by clicking the target multiple times to get like 20 of the item...

any ideas to fix that?
 
Level 16
Joined
May 1, 2008
Messages
1,605
Edit - i create this trigger and it works:

  • Tree dies
    • Events
      • Destructible - A destructible within (Playable map area) dies
    • Conditions
      • (Destructible-type of (Dying destructible)) Equal to Summer Tree Wall
    • Actions
      • Item - Create Tome of Experience at (Position of (Dying destructible))
( even if more trees "die" at the same time)
 
Level 4
Joined
Mar 27, 2009
Messages
66
i have A LOT of trees...it says it will only work for the first 64.

everytime i try that trigger it doesn't work sadly...is there any other way?
 
Level 16
Joined
May 1, 2008
Messages
1,605
Yes there is another way.

Create a Item Table (Editor > Anvanced > Item tabels) - Create one table with items. Now you can mark all trees > Press "Enter" > klick on "Items dropped" > and select your Item table =)

Now I tested it with more then 500 trees - all die at the same time - every tree drop an item =)

=== Edit ===

Mom i get your 2nd trigger for your second question - one fix needed [X] here it is:

  • Tree wrong Region
    • Events
      • Time - Every 2.00 seconds of game time
    • 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
              • (Terrain type at (Position of (Picked destructible))) Equal to (What ever you want^^)
            • Then - Actions
              • Destructible - Remove (Picked destructible)
            • Else - Actions
              • Do nothing
 
Level 4
Joined
Mar 27, 2009
Messages
66
your trigger to remove trees from ice works perfectly, thank you


and i guess i'll just leave my current trigger for when tree's die as is until i find a different way to do it...
 
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

Hey hey hey ;) i think i have found a way - mom I will fix something [X]

Ok here we go:

  • Item drop if Tree die
    • Events
      • Time - Every 0.10 seconds of game time
    • 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
              • ((Picked destructible) is dead) Equal to True
            • Then - Actions
              • Item - Create Tome of Experience at (Position of (Picked destructible))
              • Destructible - Remove (Picked destructible)
            • Else - Actions
              • Do nothing
1) You need to remove the tree - or items will mass spawned
2) This trigger works only if a tree DIES - if a tree is REMOVED - no item will spawned
3) I take "every 0.10 seconds" - you can take a time what you want ;)
 
Status
Not open for further replies.
Top