• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Make units turn into other units at armory?

Status
Not open for further replies.
Level 10
Joined
Nov 5, 2008
Messages
536
What I try to do:

Neutral civilians are scattered over the map. If a player moves his marine close to a civilian, he gains permanent control of it. (This thing works for me.)

There are also neutral armories on the map. If a player brings his civilian up to a neutral armory, the player can choose to "equip" his civilian. He can, for example, choose either marine, medic or firebat. Depending on what he chooses, the civilian "disappears" and is replaced by a new marine, medic or firebat.

I have tried to make this in a way that the Larva - train ability on the civilians only works when they are near a neutral armory. (So if you have 3 civilians and only 1 is near the armory, only that unit shall be able to use Larva - train)

I have also tried to make that players can get temporary control of a neutral armory, and in the building train a marine, medic or firebat and killing the civilian.

It is important that a civilian can only become an other unit when it is standing near an armory.

How on earth can this be done in such a simple way as possible?
 
Last edited:
Level 11
Joined
Jul 20, 2004
Messages
2,760
You could also try the other way:
1. Give the "morph into unit" abilities to Civilians (inspired from BroodLord morph should work)
2. Create a special behavior (that does nothing and is invisible on the UI but works as a flag).
3. Condition every morph ability by the special behavior.
4. Create an aura behavior that gives units the behavior they need to morph (you can use Cloaking Field as reference).
5. Give aura to armories.
 
Level 10
Joined
Nov 5, 2008
Messages
536
4. Create an aura behavior that gives units the behavior they need to morph (you can use Cloaking Field as reference).
5. Give aura to armories.

Would it be possible to add this part of you qoute to the Larva train ability on the civilian?

If a civilian acts like a larva and has 3 command cards on it with units it can train into, to be able to use Larva - train ability the civilian must be near an armory. An aura is on the armory which gives the civilians a buff behaviour. When they get the buff behaviour they can use the train ability.

Thoughts about this method?


How do I turn a behaviour into a requirement for the ability?

Requirement: Count behaviour - Armory aura - Completed/in progress/queued or better?
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
(damn, I just deleted my whole reply).

Regarding the Larva ability, hell, if it works for you, why not?! I never played with it before so I don't know how this will work. Keep me posted, and if it fails, try the Brood Lord Morph alternative.

For the behavior restricting ability, try something like this:
1. Setup a requirement (look for Requirements tab if you don't have it visible). Use as source of inspiration Ghost Holding Fire and replace the behavior to your own.
2. On the ability, go to Ability: Commands field. Modify the "requirement" for executing to the requirement you just created at step 1.
 
Level 10
Joined
Nov 5, 2008
Messages
536
For the behavior restricting ability, try something like this:
1. Setup a requirement (look for Requirements tab if you don't have it visible). Use as source of inspiration Ghost Holding Fire and replace the behavior to your own.
2. On the ability, go to Ability: Commands field. Modify the "requirement" for executing to the requirement you just created at step 1.

Yes! It works! The civilian can not train any units until I reach the armory.

But there is one thing that is a bit strange.. When I reach the armory, the civilian gets the aura buff. (Based on Motherships - Cloaking Field) When the civilian has the buff it can train a unit. When I move the civilian away from the armory, it still has the buff!
I go to the other side of the map, the civilian still has the buff. The radius of the aura is not that large. T_T

I wonder if this has anything to do with the requirement I use.
Count behaviour - Ability: Armory Aura - Completed.
Once the civilian recieves the buff, it counts as complete for the rest of the game?

Any theories?
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
When the duration is set to 0, it does not expire on its own (duration interpreted as infinity). Setting it to 0.5 ensures its expiration once outside the range of the regenerating aura - aura caster behavior actually repetitively triggers an area search around the caster to apply the aura target behavior to all units nearby. Keep in mind that the smaller the waiting time between two regenerations is, the greater the overhead, but the better the response to units entering/exiting the aura is.

Great job on getting it to work too. Glad I could help.
 
Status
Not open for further replies.
Top