• 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.

how i can only resurrect the trees

Status
Not open for further replies.
Level 2
Joined
Feb 27, 2009
Messages
7
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.
 
Level 10
Joined
Jul 31, 2008
Messages
477
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.
 
Level 3
Joined
Jul 6, 2008
Messages
42
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.
 
Level 10
Joined
Jul 31, 2008
Messages
477
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
 
Level 2
Joined
Feb 27, 2009
Messages
7
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:
 
Level 8
Joined
Aug 3, 2008
Messages
391
I've actually typed a more decent trigger (taken from the DotA Template that I've modified) but couldn't post it because Ralle decided to update THW at the time. Got school in a few minutes, but I'll try to post the trigger later on.
 
Level 20
Joined
Oct 21, 2006
Messages
3,230
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.
 
Level 3
Joined
Jul 6, 2008
Messages
42
Well , in that case try

  • (Destructible-type of (Picked destructible)) Not Equal to Gate
if ur tree type more than gate or other destructible
 
Level 12
Joined
Mar 16, 2006
Messages
992
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 )
 
Level 3
Joined
Jul 6, 2008
Messages
42
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 =)
 
Level 8
Joined
Aug 3, 2008
Messages
391
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 )
 
Level 2
Joined
Feb 27, 2009
Messages
7
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.
Top