Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Morphing units into other units with EUDs
Morphing units into other units with EUDs
Dec 12 2021, 12:54 am
By: Brusilov  

Dec 12 2021, 12:54 am Brusilov Post #1



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.

Dec 12 2021, 3:58 am Oh_Man Post #2

Find Me On Discord (Brood War UMS Community & Staredit Network)

You could do it with triggers instead if it's hardcoded.




Dec 12 2021, 4:19 am Brusilov Post #3



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.

Dec 12 2021, 6:33 am Oh_Man Post #4

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




Dec 12 2021, 11:45 am UndeadStar Post #5



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.




Dec 12 2021, 4:09 pm Brusilov Post #6



Quote from Oh_Man
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

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.

Quote from UndeadStar
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.

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.

Dec 12 2021, 6:50 pm UndeadStar Post #7



Quote from Brusilov
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.




Dec 14 2021, 3:54 am Oh_Man Post #8

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.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[06:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[06:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
[06:38 pm]
Vrael -- I need a go-to solution and someone who understands that Carpets are more than just decorative elements in my home.
Please log in to shout.


Members Online: NudeRaider, Vrael