• 🏆 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!

Create a breed ability?

Status
Not open for further replies.
Level 10
Joined
Nov 5, 2008
Messages
536
This time I am not asking for someone to show me how something can be done from scrath. Nope! Today I have created my own solution to this problem. Unfortunately my solution does not work so the problem remains.

What I try to create:

I try to create an ability on the queen called "Breed." Breed can be casted on target ground unit. The unit will become an egg and morph into an extra copy of itself. Just like a hydralisk can be morphed into a lurker, I want the same process to make a hydralisk morph into 2 hydralisks. A zergling morph into 2 zerglings. Etc. But it most cost resources and use up supplies. So if I want to breed a hydralisk I will for example lose 100 min/ 50 gas.

How I have done this:

I have created 4 unique Train larva - abilities. Each train ability only allows one type of unit to be trained. The Hydralisk has a train ability which allows it to train a hydralisk. The Zergling has a train ability that lets it train a zergling. etc These abilities are not shown on a command card, but are added to the units. I uncheck the flag "Kill on complete" which means that the unit who started the morph will survive together with the extra unit spawned.

The queen has an "Effect - Target" - ability which uses a set effect which uses several Issue order effects. (One Issue order effect for every type of train ability) The issue order effects orders targeted unit to use it´s train ability, thus making it beome an egg. (This part seems to work so far.)

What is wrong?

The actors screws this up big time for me. I have looked at the actors for this chain:

>>>A hydra morphs into a lurker cocoon and morphs into a lurker. <<<

I have recreated everything from the actors and added it to my own chain:

>>>Hydra morphs into hydra cocoon morphs into hydra.<<<

But this does not work. Everything looks terrible (the hydralisks gets an egg inside the stomach and error messages appears) plus that I have to make this chain for every type of unit that I want to morph.

-------------------------------------------------------------------------

Can this be made in a more simple and effective way?

Can a similar but different ability be made in a more effective way?
 
Last edited:
Level 10
Joined
Nov 5, 2008
Messages
536
Fix the actors then, you clearly are not destorying the actors at the right time and then remaking them.

The problem is that I have no idea how to solve actors for X different units and then have different eggs and morph actors for everyone. That is why I wonder if there is any other way to make the abilitiy.

-----------------------------------------------------------------------------------------------------------------------

Edit: I finally got the actors to work! Now the hard work is to make an individual train ability for each unit and add actors. But the ability works as I want it to!

----------------------------------------------------------------------------------------------------------------------

One small thing: The only thing I have not found out yet is how to create a "not enough mineral" - sound/text when the ability targets a wrong target. Since my ability drains resources from the player when he targets one of his units, I would like to add something to indicate that he is not allowed to do that action. (if he has to few resources) In the same way when a player tries to build a building he does not have resources to.

Any clues how this can be made?
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
The StarCraft II game engine is not designed to cope with variable costs depending on target. What you can do is simulate the cost causing the ability to fail if the target costs too much and then play a dummy error message and sound but this will probably not be exactly the same as the normal error message for cost.
 
Level 10
Joined
Nov 5, 2008
Messages
536
The StarCraft II game engine is not designed to cope with variable costs depending on target. What you can do is simulate the cost causing the ability to fail if the target costs too much and then play a dummy error message and sound but this will probably not be exactly the same as the normal error message for cost.

Oh, okey. But when a player morph a unit in a hatchery via the normal Larva - Morph unit abilitiy, a sound appears if the player has not enough resources.

Since I use modifed versions of "Larva - morph unit" and forces the producion of units via an issue order, the ability should give a message if not enough resources?

I mean, after all, it´s a version of Larva - morph ability added to other units and the money used to train units are drained from the units cost. Not from an execute cost of the ability.

I add the "Morph train Zergling" ability to the zergling and give it a command card. I train a zergling "the normal way" (without an issue order) and the "not enough minerals" sound is played.

How can the issue order effect screw this up so big?
 
Status
Not open for further replies.
Top