HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Zerg-like unit training issue

03-10-2011, 07:53 PM#1
Linaze
Hello.

I am working on a map where a building, a Dragon Roost, will be featured.
For this Dragon Roost I'm planning a different way of training units than the normal one.
My idea is that the Roost lays eggs that upon hatching spawns a dragon.

I've made it so that the Dragon Roost sells Eggs (like a merchant place, because it should be instant). Now, the actual hatching part. I've tried everything that I can think of, but nothing is good enough. Ordering the egg to train a dragon doesn't work, because the player could be silly enough to train more Dragons with one egg (even though it would die after hatching, which is after the first dragon, so people would just lose resources). Making the egg upgrade to an egg doesn't work because I don't want players to hear "Upgrade complete" every time a dragon hatches. I tried a Phoenix like system, but that way you can't get a proper way of cancelling the egg to get refunded resources.

You guys have any ideas?

Thanks in advance.
03-10-2011, 07:56 PM#2
deolrin
Don't forget that being able to kill the egg is a big bonus.
I suggested a summoned unit system, that, when the egg dies from an outage, spawns a dragon, but apparently that's not good enough for some reason. :o
03-10-2011, 09:51 PM#3
moyack
I'd use the hydra ability, when it dies, it summon other hydras. Sorry, but I don't remember the name of that ability.
03-11-2011, 12:14 AM#4
Linaze
I tried that, but there's no proper way of cancelling the hatching to refund resources using that method.
03-11-2011, 01:54 AM#5
Fledermaus
Why not make it train a unit and then kill the training unit when it's finished?

EDIT: Read your post about training more than 1. Does that give off an order? If so you could catch the order and then issue an un-train?


Double EDIT: If you're not using any other upgrades, you could just change the "Upgrade Complete" sound + text to Unit Finished or whatever it is.
03-11-2011, 02:52 AM#6
Fledermaus
Double Post for great justice!

I made a map for you that I think does exactly what you want. Hopefully you understand vJass, otherwise feel free to ask me as there's not a lot of setup you need to do to get it working for you map.
Attached Files
File type: w3xDragon Eggs.w3x (45.0 KB)
03-11-2011, 09:42 AM#7
deolrin
Hmm. Fledermaus, I believe you did not understand Linaze, or he did not explain himself properly.
The dragon egg, once hatched, immediately starts transforming into a Red Dragon. However, if the training process is canceled, the egg is destroyed, and the dragon is refunded. The egg can also be destroyed by enemies, and if such a situation happens, you do not get a refund(or a dragon for that matter).
Basically, we're trying to achieve a new way of training a specific unit; Something similar to the Zerg training method in Starcraft.
03-11-2011, 04:44 PM#8
PurplePoot
Have a dummy undead builder start constructing a building (the egg) which, when it completes, is replaced with your dragon.

Or, if you don't care about the progress bar, just make it a separate unit and manually trigger the "cancel" ability. You could maybe use an expiration timer and have a sort of reverse progress bar.

Ultimately if you want the progress bar it's going to have to be based off some sort of ingame construction, whether that is researching an upgrade, upgrading a unit, training a unit, or constructing a building. If you desperately want the progress bar and don't want an "xxx complete" sound, do this method or the upgrading a unit method, remove the sound from the Game Interface section, and manually play it when it should be played.
03-11-2011, 04:50 PM#9
deolrin
Quote:
Have a dummy undead builder start constructing a building (the egg) which, when it completes, is replaced with your dragon.
But then the egg's health will be fucked up, as in, it wont start at full health. Thus killing it will be easier at times. Besides, what if you have like 5 Dragon Roosts and summon eggs at all of them at exactly the same time? The replace thing wont work properly, will it?

Quote:
Or, if you don't care about the progress bar, just make it a separate unit and manually trigger the "cancel" ability. You could maybe use an expiration timer and have a sort of reverse progress bar.
I'm pretty sure Linaze does care about the Progress Bar, and I also think he wants it to be cancel-able by pressing 'ESC'.

Quote:
Ultimately if you want the progress bar it's going to have to be based off some sort of ingame construction, whether that is researching an upgrade, upgrading a unit, training a unit, or constructing a building.
I think he tried most of those. :S The thing is, there's always something bad about it. Sometimes it's just that there is no progress bar, sometimes there is an 'Upgrade Complete' sound, sometimes you can't kill the egg, sometimes you can't cancel the egg using ESC, etc...

Quote:
If you desperately want the progress bar and don't want an "xxx complete" sound, do this method or the upgrading a unit method, remove the sound from the Game Interface section, and manually play it when it should be played.
But that really overcomplicates the normal upgrades. It's probably more of a final solutions. :P
03-11-2011, 04:52 PM#10
PurplePoot
Quote:
Originally Posted by deolrin
But then the egg's health will be fucked up, as in, it wont start at full health. Thus killing it will be easier at times.
A building's health doesn't have to be tied to its progress. Just heal it to full as soon as it's started.

Quote:
Originally Posted by deolrin
Besides, what if you have like 5 Dragon Roosts and summon eggs at all of them at exactly the same time? The replace thing wont work properly, will it?
It will work fine.

Quote:
Originally Posted by deolrin
I'm pretty sure Linaze does care about the Progress Bar, and I also think he wants it to be cancel-able by pressing 'ESC'.


I think he tried most of those. :S The thing is, there's always something bad about it. Sometimes it's just that there is no progress bar, sometimes there is an 'Upgrade Complete' sound, sometimes you can't kill the egg, sometimes you can't cancel the egg using ESC, etc...
See edit.
03-11-2011, 09:36 PM#11
Fledermaus
Mmk, new version of the map then.

EDIT: The only thing I can't seem to get working now is making it not return resources when an enemy kills it. I feel like it should be in Gameplay Constants but I can't find it.. You could just make the Unit Cancelled return rate 0 and store the dragon's costs and then refund the players that if an egg is canceled but I'll wait and see if someone remembers a simpler way first.
Attached Files
File type: w3xDragon Eggs.w3x (45.8 KB)
03-12-2011, 01:04 AM#12
Nuclear Arbitor
you could have it give the resources back because when the egg dies the dragon eats it and therefore it doesn't cost you anything ^.^
03-12-2011, 01:15 AM#13
Linaze
Quote:
Originally Posted by Fledermaus
Mmk, new version of the map then.

EDIT: The only thing I can't seem to get working now is making it not return resources when an enemy kills it. I feel like it should be in Gameplay Constants but I can't find it.. You could just make the Unit Cancelled return rate 0 and store the dragon's costs and then refund the players that if an egg is canceled but I'll wait and see if someone remembers a simpler way first.
You're getting close, I'll give you that much.
As for resource refunding, that comes automatically when you cancel a unit and not when it dies, so I don't see your problem at all. Care to elaborate?
03-12-2011, 07:59 AM#14
deolrin
He means that when killing the egg, you still get the resources back.
Alright Fledermaus, that's cool.
Now lets see, a few more things.
1) When you cancel the dragon by clicking on the icon in the training UI, the egg is not destroyed.
2) The "Hatch into Red Dragon" icon shouldn't be there.
3) The resources should be wasted on the egg, otherwise people will not know how much do Dragons cost.
4) In addition to that, you also still need to make it not give resources back when it dies. :P