Timed Unit Evolution

mirrorman1de

Cool Member
Reaction score
4
I would like to create a skill that summons a unit which evolves through multiple states of development.

lets say it starts as an egg, after 20 seconds it becomes a dragon whelp, after another 20 seconds it becomes a level 6 dragon, and after that it becomes a lvl 10 dragon.

what is important is that the unit only evolves if it is alive. so, spawn on death (like hydra/spiderling) is an inappropriate mechanism.

phoenix morph has a nice timer bar, but it plays the death animation on the current unit and the new unit is invisible, at least in my test trials, maybe because some animations are required that are not comprised in the model.

has anyone any ideas on how to solve this?
 

Samael88

Evil always finds a way
Reaction score
181
Code:
Event
    Unit enters region(Entire map)
Conditions
    type of Entering unit equal to dragon whelp
Actions
    Wait 20 seconds
    if entering unit is alive//Boolean condition
    then
        Remove entering unit
        Create new unit.
    Else
        Don't put anything here, unless you want's something to happen.

That should work fine.
Make one of those for every unit-type.

You may need to change the entering unit into triggering unit, I am not sure.
But it should be MUI:)
 

mirrorman1de

Cool Member
Reaction score
4
as far as i see this trigger works only if there is only one unit of each type exisiting in the game at the same time.

because auf the wait function, i need to store the unit in a variable which gets overwritten every time the event triggers (as is 'entering unit')
 

shadowcon

New Member
Reaction score
4
I don't think WE likes variables before the actions, I can be wrong

and triggering unit is in that case entering unit. And I don't think "entering unit" exist
 

Flare

Stops copies me!
Reaction score
662
as far as i see this trigger works only if there is only one unit of each type exisiting in the game at the same time.

because auf the wait function, i need to store the unit in a variable which gets overwritten every time the event triggers (as is 'entering unit')
Change to Triggering Unit, and it should be MUI (unless there is something else which doesn't like waits in that trigger :p)

I don't think WE likes pre-actions variable, I can be wrong

and triggering unit is in that case entering unit. And I don't think "entering unit" exist
1) What?
2) Entering unit does exist (and, in this case, functions in precisely the same way) - only questionable thing would be the MUI capabilities of Entering Unit
 

vypur85

Hibernate
Reaction score
803
Use Expiration timer. Give them 20 seconds life time when created.

Then trigger the evolution:

Code:
Event
 A unit dies
Condition
 (Killing unit) Equal to (No unit)
 Unit-type of (Triggering unit) Equal to Egg
Actions
 Unit - Create 1 Dragon Whelp for someone at somewhere....
 Unit - Set life, mana and all...
 Unit - Remove (Triggering unit) from the game

Do this for all of your other unit-types.
 

shadowcon

New Member
Reaction score
4
1) I think WE don't like variables being used in event etc, I think I can remember testing it a couple of months ago. Correct me if I'm wrong.
2) ok, I didn't know, anyway, how COULD it function otherwise? because it is event response huh?
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
store all the dragons into unit array variable
then create a trigger:

Code:
Evolving trigger
e: every 20 seconds of game time
c:
a: set count_integer = integer
   set integer = integer + 1
   replace unit[count_integer) with unit[integer] using blabla....

and another trigger:

Code:
Turn on/off
e: unit dies
c:
a: for each (Integer A) from 1 to (number of dragons you have)
   Loop Actions
      if unit type of dying unit equal to unit[Integer A]
      then Turn off evolving trigger
  wait x seconds
  turn on Evolving trigger
 

vypur85

Hibernate
Reaction score
803
> how COULD it function otherwise?

Try this yourself and see the difference:

Code:
Event
 A unit Starts the effect of an ability
Condition
Actions
 Wait 10 seconds
 Unit - Kill (Casting unit)

Give Warstomp to 2 units in your map. Then order them to cast within 10 seconds. See any unit would die or not.

Now change to this:
Code:
Event
 A unit Starts the effect of an ability
Condition
Actions
 Wait 10 seconds
 Unit - Kill ([B]Triggering unit[/B])

Do the same thing. See any of the unit dies or not.

Anyway, the point is, Triggering unit is always MUI, even with waits. But this might not be true for others. Example: 'Attacked unit', 'Entering unit'... etc. This was what he meant.
 

shadowcon

New Member
Reaction score
4
I meant how could entering and triggering unit be different, I knowthat wait removes, casting unit, attacked unit etc, was one of the first things my cousin told me when he taught me about the world editor
 
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