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

Lumber Foresting

Status
Not open for further replies.
Level 4
Joined
Oct 24, 2005
Messages
45
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)
 
Level 13
Joined
Jan 9, 2004
Messages
1,037
You problem is in the last line
Code:
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*
 
Level 13
Joined
Jan 9, 2004
Messages
1,037
Oh, you also have another problem in that line
Code:
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.
 
Level 4
Joined
Oct 24, 2005
Messages
45
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
 
Level 6
Joined
Sep 17, 2005
Messages
276
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:
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???
 
Level 4
Joined
Oct 24, 2005
Messages
45
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
 
Level 6
Joined
Sep 17, 2005
Messages
276
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. :?
 
Level 3
Joined
Sep 19, 2005
Messages
36
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
 
Status
Not open for further replies.
Top