HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How do I make trees regrow in GUI

04-14-2007, 05:37 PM#1
lome
Hi, i want to know if its possible to make trees regrow after a minute in GUI.
I dont understand JASS.
Ps: How do i give rep? +1 to the person who tells me (about the tree regrow or rep)
04-14-2007, 05:50 PM#2
TaintedReality
Again, look through the trigger actions before asking. There's one called Destructible - Resurrect which has the option to show birth animation or not. If you have it show birth anim it should look like the tree is growing. As for having it wait a minute, you'll have to start a timer with a duration of 60 seconds, and when it expires resurrect the tree. However, you'll have to handle multiple trees dying within that 60 second period, so you'll have to have an array of timers. I'll leave it to you to figure that out =p.
04-14-2007, 08:24 PM#3
iNfraNe
Or just use wait if you're a noob :)
04-15-2007, 02:11 AM#4
PurgeandFire111
Just do something like this:
Code:
Tree Revival System
    Events
        Destructible - A destructible within (Playable map area) dies
    Conditions
    Actions
        Set DeadDestruct = (Dying destructible)
        Wait 60.00 seconds
        Destructible - Resurrect (DeadDestruct) with (Max life of (DeadDestruct)) life and Show birth animation
Something like that. I forgot whether or not Playable map area leaks, if so, create an initialization trigger, set the point or rect or whatever (I forgot which one it is) variable as the playable map area, then just use the variable instead of playable map area.

EDIT: P.S.: To rep someone, click the button under the post count of the user which is under the avatar, then click the button with a "check mark" and the "X" mark. :D
04-16-2007, 04:03 AM#5
Pyrogasm
Building on what PurgeAndFire111 said, but with another hitch:

The "a destructible dies" event only registers for the first 64 destructibles on the map. Thus, you will need to do something like this:
Trigger:
Collapse Events
Map Initilization
Conditions
Collapse Actions
Destructible - Pick every destructible in (Playable Map area) and do (Add to YOUR OTHER TRIGGER <gen> the event ((Picked Destructible) dies))
YOUR OTHER TRIGGER:
Events
Conditions
Collapse Actions
Custom script: local destrutible udg_DyingDestructible
Set DyingDestructible = (Dying Destructible)
Wait 60.00 seconds
Destructible - Resurrect (DyingDestructible) with (Max life of (DyingDestructible)) life and Show birth animation
Change the name of the variable to whatever you want, but also remember to change the text of the custom script to read "udg_" + the name of your destructible variable.
04-16-2007, 04:05 AM#6
Tide-Arc Ephemera
Off topic but asked,

To give rep, on the left hand side, underneath someone's name is a little folder looking icon, it has a tick and a cross on it. If you click on it, you can add to peoples' rep.

*edit - That little folder looks like this.
Attached Images
File type: gifreputation.gif (433 bytes)