• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] How do I "grow" a lootable plant?

Status
Not open for further replies.
Level 2
Joined
Jan 28, 2009
Messages
15
I want to make a growable plant, like a crop(example would be Werewolf:transylvannia farming).

Would it work to just destroy the building(plant) once it is finished building(growing), and use a trigger to replace it with an item that has the same model(but now lootable)?

Or is there a better way to do it?
 
Level 11
Joined
Nov 15, 2007
Messages
800
Never played the map you referenced, so could you explain a little further what you need? Just a building that becomes an item after a period of time?
 
Level 5
Joined
Oct 17, 2006
Messages
151
in Transylvania it was a unit (with the locust ability so its unselectable) and a gen timer. When the unit died replace it with another unit which is the "older version" of the plant. Keep doing it to where you get your final "growing" phase and then when that final version of the unit dies, create an item in its place.
 
Level 5
Joined
Oct 17, 2006
Messages
151
Sorry I made a mistake there...

I am not sure if the locust ability (i havent actually tested it out) makes units un-selectable... I know that it hides the health bars though!

If you do not want to use units or locust ability doesnt make units un-selectable, then you could make it a destructible and with a separate trigger where it picks all destructible of that type and set their health to (current health - 1) and then with another trigger you set the event so that when that destructible dies you create a new "older version" destructible and etc...

Basically like the above post just you use destructibles instead of units and you set their life (in seconds) to their health.

This way actually might be better to because you will avoid seeing it as a unit on the minimap owned by someone and instead like a little colorful dot depending on the color of the plant...
 
Level 11
Joined
May 31, 2008
Messages
698
Just make it a building and when construction is finished kill the building and make an item with the same model at the position of the building. Also i dont think that the plants in werewolf had locust, i remember being able to select them when they were being made but idk. And just to clarify locust makes a unit invulnerable and unselectable.
 
Level 11
Joined
May 31, 2008
Messages
698
Well in werewolf i think that the model just gets bigger as it goes, but i guess that you could use units and just replace them a bunch of times, but that would require making alot of units and alot of triggers, or at least one long trigger
 
Level 5
Joined
Oct 17, 2006
Messages
151
ohhhh I see...

Well it depends for what he is doing i guess... if he is indeed just making them bigger and bigger then the building with locust ability would be easiest. However if you are using multiple models my way is best... :thumbs_up:
 
Level 5
Joined
Oct 17, 2006
Messages
151
ohhh!!! that gives me an idea!!!

instead of construction do upgrade! Yes you would have to make multiple unit but its less triggering because while it upgrades the scale grows (say the first version has a scale of .01 then in like 5 minutes it will grow from that to 2... it will look so cool because its a continues scale change!) :thumbs_up:

hehehe... that is so dang spiffy!
 
Level 11
Joined
May 31, 2008
Messages
698
spiffy indeed. lol
Yeah if you wanted to change scale def do thru trigs because the model prolly doesnt have a birth animation (even one that just gets bigger) since its a doodad, so while its building it would just sit there and not change in size
 
Level 5
Joined
Oct 17, 2006
Messages
151
or you can do an upgrade and it will grow in scale to match the new scale instead of use the birth animation (because there isnt one)... :grin:

I have used this before but not for this kind of system...
 
Just to clarify - locust doesn't make units entirely invulnerable - some AOE spells and damage via triggers can still target them. And about your trigger - make the units grow slowly with triggers (there is a way of changing the unit's size with triggers, not sure what it is in GUI, but I know it's SetUnitScale in Jass), then when it has reached max size, replace it with an item - simple.
 
Level 12
Joined
Mar 23, 2008
Messages
942
Just to clarify - locust doesn't make units entirely invulnerable - some AOE spells and damage via triggers can still target them. And about your trigger - make the units grow slowly with triggers (there is a way of changing the unit's size with triggers, not sure what it is in GUI, but I know it's SetUnitScale in Jass), then when it has reached max size, replace it with an item - simple.
The unit is invulnerable, since they get the invulnerable description and I never see in my life a locust unit from the locust spell be destroyed.
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
For the size: You can also trigger it!
Every X secs of the game
Pick every unit in PlantGrowGroup and do
loop - Actions
Animation - Change unit size

IDK how to make it grow steadily, but that should do it, and that way you can check easily if it is big enough,,
I would tri 0.2 secs maybe,, or if you want it to look good, 0.03 secs, that is so fast, you cant see it grow with pauses,, so it will look really smooth,,
And of course check if the group is empty, and turn off the trigger if so,,
 
Status
Not open for further replies.
Top