Regrowing trees

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Something like this maybe:

Code:
Trees Start
    Events
        Map initialization
    Conditions
    Actions
        Destructible - Pick every destructible in (Entire map) and do (Actions)
            Loop - Actions
                Trigger - Add to Trees Regrow <gen> the event (Destructible - (Picked destructible) dies)


Trees Regrow
    Events
    Conditions
    Actions
        Wait 30.00 game-time seconds
        Destructible - Resurrect (Dying destructible) with (Max life of (Dying destructible)) life and Show birth animation
 

JuffoWup

New Member
Reaction score
6
I used this on my map:

HTML:
REGROW TREE
    Events
        Destructible - A destructible within (Playable map area) dies
    Conditions
        (Destructible-type of (Dying destructible)) Equal to Summer Tree Wall
    Actions
        Wait 30.00 seconds
        Destructible - Resurrect (Dying destructible) with (Max life of (Dying destructible)) life and Show birth animation

well its pretty simplified, but it worker.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> pretty simplified, but it works.

But not very good.
The event "destructible in region dies" only registers the first 64 destructibles it finds...
 

JuffoWup

New Member
Reaction score
6
Yeah, but i tried timed event, and for some reason it started spawning additional trees, I think the game somehow missed trees that had respawned at the same time. But then again my way was used on a map that had only about 20 trees to respawn.
 
P

Persen

Guest
Doesn't the same limit apply to "pick every destructable" actions?
 

AgentPaper

From the depths, I come.
Reaction score
107
if it does, just use smaller regions.
 

TPOX

New Member
Reaction score
10
theres a real simple jass code youd have to search forum. i think acehart's way makes lag spikes every time it checks if you have too many tress not 100 percent sure though.
 

AgentPaper

From the depths, I come.
Reaction score
107
I think building on it removes the tree, making it so it can't grow there. if you have problems a simple boolean, check if units in area thingy will fix it.
 
N

Neopolis3

Guest
Funny. Then the building will be surrounded by trees. :D And any units still inside the forest would be stuck too.
 

JuffoWup

New Member
Reaction score
6
Could this be fixed so that the Region where the trees are would be non-buildable ? just an idea...
 

emjlr3

Change can be a good thing
Reaction score
395
check out the Dota template, they use a pretty neat thing to respawn creeps after they die, you could prolly use the same thing, except with destructables, give it a look
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top