Growing Trees Over Time

SarChasm

New Member
Reaction score
15
Actually, I found it easier to just do it like this:

Trigger:
  • Grow Tree
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Avatar
    • Actions
      • Destructible - Create a Summer Tree Wall at (Position of (Triggering unit)) facing (Random angle) with scale 1.00 and variation 0
      • Animation - Play (Last created destructible)'s birth animation


The unit "Avatar" would have an ability based off Detonate.

The only problem is that this can be cast on buildings, making them impossible to harvest from, and a general nuisance. Another problem that will occur is if the "Avatar" unit dies from any other cause other than Detonate.
 

SarChasm

New Member
Reaction score
15
Is it really that significant of a leak? <_<

Anyway, I'm trying to find out how to solve the two problems presented.
 

Ayanami

칼리
Reaction score
288
Is it really that significant of a leak? <_<

Anyway, I'm trying to find out how to solve the two problems presented.

Well, it might seem insignificant at first. However, it'll build up, and it can be serious enough to cause Server Splits.

Why not just use MUI? ><
 

SarChasm

New Member
Reaction score
15
Real reason: I don't want to read all that. D:

Other reason: Now that I think about it, I actually prefer having the whole "unit sacrifice itself to make a tree" thing.
 

Ayanami

칼리
Reaction score
288
Lol. It'll be good if you read up on it. It'll be extremely useful for future triggering.
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Yes MUI is better if ur read a tut. Ther is to much to tell about it here (wordlimit)
 

Genkora

Frog blast the vent core!
Reaction score
92
perhaps you could have a destructible that isn't harvestable as the growing animation, and after so many seconds, you replace it with a real tree. As for making it MUI, you could use dynamic events (what I mean by dynamic events is using the function add event to trigger) because you can have a wait of any time using specific unit events, or you can use locals. A guide that will help you with locals is here: http://world-editor-tutorials.thehelper.net/cat_usersubmit.php?view=51725
 

Joccaren

You can change this now in User CP.
Reaction score
54
I'm not sure if this will work but you could try basing the ability on something like "Summon water elemental"
Create a custom unit (make sure its a unit) called baby tree and give it the locust ability (so it can't be selected)
Set the spells duration to 3600 (the max)
Make a trigger that when this ability is cast, set the last created unit as 'Baby_Tree'
Wait five seconds
Replace 'Baby_Tree' with a true tree.
Possible problems:
Summoned baby tree may not count as the 'Last created unit'
May not be able to replace a unit with a destructible (I'm gathering you will want to be able to harvest these trees, if not then this problem won't matter)
Edit: Srry, didn't read the second page!
 

Ayanami

칼리
Reaction score
288
I'm not sure if this will work but you could try basing the ability on something like "Summon water elemental"
Create a custom unit (make sure its a unit) called baby tree and give it the locust ability (so it can't be selected)
Set the spells duration to 3600 (the max)
Make a trigger that when this ability is cast, set the last created unit as 'Baby_Tree'
Wait five seconds
Replace 'Baby_Tree' with a true tree.
Possible problems:
Summoned baby tree may not count as the 'Last created unit'
May not be able to replace a unit with a destructible (I'm gathering you will want to be able to harvest these trees, if not then this problem won't matter)

It will indeed not be counted as "Last created unit". This only counts when you make use of the trigger "Unit - Create a unit facing a angle/point". Besides, even if this worked, it'll overwrite each other if casted before the wait is finised.
 

the_ideal

user title
Reaction score
61
Perhaps there is a better way to approach this spell. I'm looking for something that will create a marker so that the player will know where the spell was targeted. Then after x amount of time, the marker will disappear, and a tree will spawn where the marker formerly was.

EDIT: Turns out the original code works, but only if the worker stays put for the duration of the spell. Perhaps this is something that has to do with the Channel ability itself?

Just make the cast/follow through time really low, like .1 seconds.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top