• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

how i can only resurrect the trees

Status
Not open for further replies.

Windsel

W

Windsel

I have this problem a long time..

I want to reborn the trees in the entire map, But I d'ont want to relive the same time, doors or other destructible.

I used the tigger of the dota template and the problem is > When a tree dies not only resurrect the trees Also the doors are closed. I just want to relive the trees.
I made a system based in the conditional or, but dont works.

:cq: how can I do this? ... Plz give me some help.
 
I guess you could do this;

  • Revive Trees
  • Events
    • Time - Time Every 10 seconds of game time
  • Conditions
  • Actions
    • Destructiable - Pick every destructible in (Playable Map Area) and do (actions)
      • Loop - Actions
        • Destructible - Ressurect (Picked Destructible) with (Max Life of (Picked Destructible)) and Show Birth Animation
But I haven't tested it so I'm not sure it would work.
 
I think this is the thing you want ...
But you need to customize something

  • Resurrect
    • Events
      • Time - Every 10.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
              • (Destructible-type of (Picked destructible)) Equal to Summer Tree Wall
              • ((Picked destructible) is dead) Equal to True
            • Then - Actions
              • Destructible - Resurrect (Picked destructible) with (Max life of (Picked destructible)) life and Show birth animation
            • Else - Actions
              • Do nothing
The part you need to change :
  • If - Conditions
    • (Destructible-type of (Picked destructible)) Equal to Summer Tree Wall
put whatever tree type that u want to resurrect.
 
I think this is the thing you want ...
But you need to customize something

  • Resurrect
    • Events
      • Time - Every 10.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
              • (Destructible-type of (Picked destructible)) Equal to Summer Tree Wall
              • ((Picked destructible) is dead) Equal to True
            • Then - Actions
              • Destructible - Resurrect (Picked destructible) with (Max life of (Picked destructible)) life and Show birth animation
            • Else - Actions
              • Do nothing
The part you need to change :
  • If - Conditions
    • (Destructible-type of (Picked destructible)) Equal to Summer Tree Wall
put whatever tree type that u want to resurrect.

Yeah right, I was going to say that but i forgot to put the if then else thing and the condition lol =D Just made the "rough" things =D
 
Tnks for the help guys :cool: but I have another question about it!


I want to now if this tigger produce lags(::) because My map contains all types of trees, and I think should have many conditional, for each type of tree would need an "if".
I do not know if I'm wrong. Could I use the coditional "Or"? or maybe the tigger don't works whit an "or".:cconf:
 
I had a large map with a lot of trees. Then had a trigger that picks random trees from the group of all trees. Like first it picks all trees and then picks one of them and then again and again... Lagged.

Just keep the amount of trees decent and it shoudlnt lag.
 
Well , in that case try

  • (Destructible-type of (Picked destructible)) Not Equal to Gate
if ur tree type more than gate or other destructible
 
Two triggers:

  • Elapsed time is X seconds
  • Destructible - Pick every destructible in (Entire map) and do (Actions)
    • Loop - Actions
      • Trigger - Add to (Trigger Below) the event (Destructible - (Picked destructible) dies)
and

  • Custom script: local destructable BADTREE = GetDyingDestructable()
  • Wait X game-time seconds
  • Custom script: call DestructableRestoreLife( BADTREE, GetDestructableMaxLife(BADTREE), true )
 
Two triggers:

  • Elapsed time is X seconds
  • Destructible - Pick every destructible in (Entire map) and do (Actions)
    • Loop - Actions
      • Trigger - Add to (Trigger Below) the event (Destructible - (Picked destructible) dies)
and

  • Custom script: local destructable BADTREE = GetDyingDestructable()
  • Wait X game-time seconds
  • Custom script: call DestructableRestoreLife( BADTREE, GetDestructableMaxLife(BADTREE), true )

Well , it will revive destructible other than trees also .
However , it is leakless =)
 
Two triggers:

  • Elapsed time is X seconds
  • Destructible - Pick every destructible in (Entire map) and do (Actions)
    • Loop - Actions
      • Trigger - Add to (Trigger Below) the event (Destructible - (Picked destructible) dies)
and

  • Custom script: local destructable BADTREE = GetDyingDestructable()
  • Wait X game-time seconds
  • Custom script: call DestructableRestoreLife( BADTREE, GetDestructableMaxLife(BADTREE), true )

Yeah that's the trigger I was talking 'bout. I'll polish it a little. Here:

  • SETUP
  • Events
    • Time - Elapsed game time is 5.00 seconds
  • Conditions
  • Actions
    • Destructible - Pick every destructible in (Entire map) and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) the do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Or - Any (Conditions) are true
              • (Destructible-type of (Picked Destructible)) equal to YourTree1
              • (Destructible-type of (Picked Destructible)) equal to YourTree2
              • (Destructible-type of (Picked Destructible)) equal to YourTree3
          • Then - Actions
            • Trigger - Add to (Trigger Below) the event (Destructible - (Picked destructible) dies)
          • Else - Actions
Else - Actions
Trigger - Add to REVIVETREE <gen> the event (Destructible - (Picked destructible) dies)[/trigger]

  • REVIVETREE
  • Events
  • Conditions
  • Actions
    • Custom script: local destructable DYINGTREE = GetDyingDestructable()
    • Wait 20.00 game-time seconds
    • Custom script: call DestructableRestoreLife( DYINGTREE, GetDestructableMaxLife(DYINGTREE), true )
 
Yes, the tigger works whit a conditional "or" whiout problems

I just pick up first the conditional --((Picked destructible) is dead) = True --and after the "OR" of all the types of trees

Tnks for the help :grin: .
 
Status
Not open for further replies.
Back
Top