1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Choose your ride to damnation in the 5th Special Effect Contest Poll.
    Dismiss Notice
  5. The winners of the 13th Techtree Contest have been announced!
    Dismiss Notice
  6. The 13th Music Contest Poll is up! Vote for the best tracks in this symphony of frost and flame.
    Dismiss Notice
  7. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

how i can only resurrect the trees

Discussion in 'World Editor Help Zone' started by Windsel, Mar 2, 2009.

  1. Windsel

    Windsel

    Joined:
    Feb 27, 2009
    Messages:
    7
    Resources:
    0
    Resources:
    0
    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.
     
  2. Grave_Digger_

    Grave_Digger_

    Joined:
    Jul 31, 2008
    Messages:
    464
    Resources:
    3
    Packs:
    1
    Maps:
    2
    Resources:
    3
    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.
     
  3. fattyghost

    fattyghost

    Joined:
    Jul 6, 2008
    Messages:
    42
    Resources:
    0
    Resources:
    0
    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.
     
  4. Grave_Digger_

    Grave_Digger_

    Joined:
    Jul 31, 2008
    Messages:
    464
    Resources:
    3
    Packs:
    1
    Maps:
    2
    Resources:
    3
    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
     
  5. Windsel

    Windsel

    Joined:
    Feb 27, 2009
    Messages:
    7
    Resources:
    0
    Resources:
    0
    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:
     
  6. HellCEzAR

    HellCEzAR

    Joined:
    Apr 24, 2008
    Messages:
    140
    Resources:
    1
    Maps:
    1
    Resources:
    1
    hm, if you use OR condition, that you must add into OR "sub-conditions" you'r additional conditions
     
  7. reza sword2

    reza sword2

    Joined:
    Aug 3, 2008
    Messages:
    290
    Resources:
    0
    Resources:
    0
    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.
     
  8. Super-Sheep

    Super-Sheep

    Joined:
    Oct 21, 2006
    Messages:
    2,823
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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.
     
  9. fattyghost

    fattyghost

    Joined:
    Jul 6, 2008
    Messages:
    42
    Resources:
    0
    Resources:
    0
    Well , in that case try

    • (Destructible-type of (Picked destructible)) Not Equal to Gate
    if ur tree type more than gate or other destructible
     
  10. Vegavak

    Vegavak

    Joined:
    Mar 16, 2006
    Messages:
    1,010
    Resources:
    0
    Resources:
    0
    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 )
     
  11. fattyghost

    fattyghost

    Joined:
    Jul 6, 2008
    Messages:
    42
    Resources:
    0
    Resources:
    0
    Well , it will revive destructible other than trees also .
    However , it is leakless =)
     
  12. reza sword2

    reza sword2

    Joined:
    Aug 3, 2008
    Messages:
    290
    Resources:
    0
    Resources:
    0
    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 )
     
  13. Windsel

    Windsel

    Joined:
    Feb 27, 2009
    Messages:
    7
    Resources:
    0
    Resources:
    0
    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: .