Hi, this might be a pretty simple question, but I'm having a lot of trouble with it; I've got a hydralisk that I want to be able to morph into a variety of different units, and I gave it customized buttons with the Firegraft plugin for EUD Editor 2. However, no matter what I try, I can't get it to morph into anything else besides a lurker. Is this hard coded? I've tried changing the conditions of the button (always, can create unit, can lurker morph) and have tried different units (terran marine, zerg drone, mutalisk), I've tried changing the birth animation, unit requirements (set to "always" instead of default, and I've also tried "custom" for Mutalisk "Unit is Zerg Hydralisk"), etc, but no dice.
None.
Find Me On Discord (Brood War UMS Community & Staredit Network)
You could do it with triggers instead if it's hardcoded.
It's a bit complicated because the reason I'm doing it is specifically to have a "dynamic" diplomacy menu in a map; the idea was to move a diplomat unit to another country's flag, morph into a different unit (which would correspond to a particular diplomatic action, be detected by a trigger), remove that unit, and replace it with the original diplomat. That way I could save units, locations, and triggers and let you handle diplomacy within the same small area.
If there's a way to handle this with triggers, I'd appreciate any advice. The solution I'm toying with now instead is to use the building morph/construction to approximately do the same thing, although it's kind of clumsy because of the fact that building placement is forced to 32x32 grid and I'm working with a very small area.
Edit -- I uploaded some pictures to show what I'm trying to do. As the game initializes, I move my Hydralisk over to the flag that represents London and then morph to lurker to select it (1.png). Goes off without a hitch. After selecting my nation, I want to go to war with Scotland -- which in this case I do via building a hatchery (whose graphic has been replaced with a flag, 2.png). However, it's a bit clunky, and you can see that the flag is offset a bit (3.png). Worse, if I try to build there it will fail, so instead I have to set the hatchery/flag about one entire tile down below it too. I'll work with this if I have to, but I'll have to be careful about spacing capital flags out appropriately, since one wrong move means I might end up declaring war on Ireland instead.
Attachments:
1.png
Hits: 2 Size: 2621.46kb
2.png
Hits: 2 Size: 2750.24kb
3.png
Hits: 1 Size: 2759.99kb
Post has been edited 1 time(s), last time on Dec 12 2021, 4:28 am by Brusilov.
None.
Find Me On Discord (Brood War UMS Community & Staredit Network)
I would instead use BuildResetEPD and BuildCheckEPD functions to do what you're trying to achieve instead. Tutorials here:
http://www.staredit.net/topic/17533/1/#40
https://github.com/BoomerangAide/GPTP/blob/master/GPTP/hooks/recv_commands/CMDRECV_Morph.cpp (see void CMDRECV_UnitMorph(u16 wUnitType))
Yes, it is hardcoded, the mismatch between the unit morphing being a hydralisk and the targeted unit type not being a lurker would cause the morph to not be allowed.
Sorry, I'm not completely sure what you're referring to. What will those two functions do? I don't see any reference to them in the tutorial.
Darn. Maybe to get around this, I could just use the Zerg Larva unit, change around its graphics/AI behavior/unit flags, and that way have a large amount of morph options (and therefore diplomacy options)? Before I waste an hour experimenting, can the larva morph into other units besides the ones it's designed for, or is it also hard coded to zerg base units?
None.
can the larva morph into other units besides the ones it's designed for, or is it also hard coded to zerg base units?
It does call the function to check unit requirements, but I think you have that covered.
Find Me On Discord (Brood War UMS Community & Staredit Network)
It lets ur buttons on the command card activate triggers. Check out skywindragoons tutorial that I linked.