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.

Lumber Foresting

Discussion in 'Map Development' started by Solid_Snake, Oct 25, 2005.

  1. Solid_Snake

    Solid_Snake

    Joined:
    Oct 24, 2005
    Messages:
    45
    Resources:
    0
    Resources:
    0
    Can someone post the trigger where I can regrow trees for a Treebase game...like (PlayerRed1 Says...Forest...all trees in Region2 are created???
     
  2. Ramza

    Ramza

    Joined:
    Jan 10, 2005
    Messages:
    3,194
    Resources:
    3
    Models:
    1
    Maps:
    2
    Resources:
    3
    Events:
    Player 1 types: Forest as an excact match.

    Conditions: -

    Actions: Pick every destructible in 'Rect' and do action: if then else; if destructible type of picked destructible = 'tree' then action: resurrect picked destructible, else action: do nothing.
     
  3. Solid_Snake

    Solid_Snake

    Joined:
    Oct 24, 2005
    Messages:
    45
    Resources:
    0
    Resources:
    0
    Failure

    For soem odd reason it won't work...
     
  4. Ramza

    Ramza

    Joined:
    Jan 10, 2005
    Messages:
    3,194
    Resources:
    3
    Models:
    1
    Maps:
    2
    Resources:
    3
    Were u player that ativates the trigger? I make that mistake 2 sometimes.

    If that doesnt work, I dunno. At me it works :p
     
  5. Horn

    Horn

    Joined:
    Mar 31, 2004
    Messages:
    938
    Resources:
    20
    Models:
    14
    Icons:
    1
    Skins:
    3
    Tutorials:
    2
    Resources:
    20
    Post your trigger code!
     
  6. Solid_Snake

    Solid_Snake

    Joined:
    Oct 24, 2005
    Messages:
    45
    Resources:
    0
    Resources:
    0
    Trigger Code

    Events- Player1Red types chatmessage containing Treebase as an exactmatch.

    Condition-

    Action- Destrucible:pick every Destrucible in Treebase <gen> and do [Actions]
    Loop-Actions
    If ((Destrucible-type of Summer Tree Wall 0187 <gen>)
    equal to Summer Tree Wall) Then do (Destrucible -Resurrect (Last created Destrucible)
     
  7. oz02

    oz02

    Joined:
    Jan 9, 2004
    Messages:
    1,205
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    You problem is in the last line
    Code (Text):
    If ((Destrucible-type of Summer Tree Wall 0187 <gen>)
    equal to Summer Tree Wall) Then do (Destrucible -Resurrect (Last created Destrucible)
    It shouldn't be last created destructible, it should be picked destructible.

    Oh, and this should be in the Maps forum.

    *MOVED*
     
  8. Solid_Snake

    Solid_Snake

    Joined:
    Oct 24, 2005
    Messages:
    45
    Resources:
    0
    Resources:
    0
    OMFG

    It still won't work...I want like have of the map's tree's to grow back...
     
  9. oz02

    oz02

    Joined:
    Jan 9, 2004
    Messages:
    1,205
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    Oh, you also have another problem in that line
    Code (Text):
    If ((Destrucible-type of Summer Tree Wall 0187 <gen>)
    equal to Summer Tree Wall) Then do (Destrucible -Resurrect (Last created Destrucible)
    It says Destrucible-type of Summer Tree Wall 0187 <gen> where it should say Destrucible-type of picked destructible.

    And next time when you copy a trigger for us to see, just right click the trigger name and click Copy as Text.
     
  10. Solid_Snake

    Solid_Snake

    Joined:
    Oct 24, 2005
    Messages:
    45
    Resources:
    0
    Resources:
    0
    Thank God for Mods.

    Player - Player 1 (Red) types a chat message containing treebase as An exact match

    Destructible - Pick every destructible in Treebase <gen> and do (Actions)
    Loop - Actions
    If ((Destructible-type of (Picked destructible)) Equal to Summer Tree Wall) then do (Destructible - Resurrect (Picked destructible) with 100.00 life and Show birth animation) else do nothing
     
  11. Sunny_D

    Sunny_D

    Joined:
    Sep 17, 2005
    Messages:
    277
    Resources:
    0
    Resources:
    0
    hm... if you do exactly what i wrote, it should work. i know u have almost the same - but almost. Try to check ALL i wrote. Because i tested it already and it works fine.

    -Check if you have set the correct rect
    -set if-then-else with multiple actions
    -check if you write a chat 'treebase' that in editor isnt set the message to 'Treebase', thats a difference.

    Code (Text):
    EVENT:

    Player 1 types a chat massage containing treebase as an exact match

    CONDITIONS:

    ACTIONS:

    Destructible-Pick every destructible in Treebase<gen> and do actions
      -loop actions
         - if all conditions are true then do actions else do actions
             -if destructible type of picked destructible equal to summer tree wall
             -then destructible resurrect picked destructible with max life of picked destructible and show birth animation
    as i said, i tested it - should work properly... :wink:


    EDIT: and btw... WHAT doesnt work at you? does nothing or does only some doodads resurrect or something else???
     
  12. Solid_Snake

    Solid_Snake

    Joined:
    Oct 24, 2005
    Messages:
    45
    Resources:
    0
    Resources:
    0
    reply

    It won't resurrect any trees when i type in Treebase.
     
  13. Sunny_D

    Sunny_D

    Joined:
    Sep 17, 2005
    Messages:
    277
    Resources:
    0
    Resources:
    0
    hm... ok. Maybe you can send me the map via e-mail and i will check it for you whats wrong....

    my adress is: Riedl.D@web.de
     
  14. Solid_Snake

    Solid_Snake

    Joined:
    Oct 24, 2005
    Messages:
    45
    Resources:
    0
    Resources:
    0
    Sry, My email doesn;t work

    SRY here is what i got so far...

    Player - Player 1 (Red) types a chat message containing treebase as An exact match

    Destructible - Pick every destructible in Treebase <gen> 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
    Then - Actions
    Destructible - Resurrect (Picked destructible) with (Max life of (Picked destructible)) life and Show birth animation
    Else - Actions
    (Destructible-type of (Picked destructible)) Equal to Summer Tree Wall
    Destructible - Resurrect (Picked destructible) with (Max life of (Picked destructible)) life and Show birth animation
     
  15. Sunny_D

    Sunny_D

    Joined:
    Sep 17, 2005
    Messages:
    277
    Resources:
    0
    Resources:
    0
    first: you dont need the -else function, trust me.

    second: uhm.. and does it work now? cz thats the same as i wrote?

    well if not, you can send me the map via email if you want so.... cz there must be another reason for that. :?
     
  16. Solid_Snake

    Solid_Snake

    Joined:
    Oct 24, 2005
    Messages:
    45
    Resources:
    0
    Resources:
    0
    Else

    How do I get rid of -Else
     
  17. Los_Tacos

    Los_Tacos

    Joined:
    Aug 5, 2005
    Messages:
    219
    Resources:
    7
    Maps:
    7
    Resources:
    7
    Just don't write anything in it.
     
  18. Sunny_D

    Sunny_D

    Joined:
    Sep 17, 2005
    Messages:
    277
    Resources:
    0
    Resources:
    0
    Re: Else

    use if-then-else (multiple actions) not the simple if-then-else funcion. then u can leave the else section empty.
     
  19. ks13

    ks13

    Joined:
    Sep 19, 2005
    Messages:
    36
    Resources:
    0
    Resources:
    0
    Ano...i can see another problem : are you sure that the trees you put in the rect are "summer tree wall" type?
    check that before you try anything