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.
[05:47 pm]
Ultraviolet -- zsnakezz
zsnakezz shouted: ultra you have any thought or notes on undead invasion?
I still haven't gotten a chance to play it yet unfortunately. I just downloaded, but today I'm working on a project with a deadline so won't be able to play it today
[04:59 am]
zsnakezz -- >:)
[04:59 am]
zsnakezz -- :)
[04:58 am]
zsnakezz -- somebody gets it
[04:58 am]
zsnakezz -- and its not all just numbers in my file screen
[04:57 am]
zsnakezz -- thank you for your comment though, good to know some people out there tried my map out
[04:57 am]
zsnakezz -- just kidding
[04:57 am]
zsnakezz -- ultra you have any thought or notes on undead invasion?
[2024-5-31. : 2:36 pm]
Wing Zero -- Bop em
[2024-5-31. : 2:36 pm]
Wing Zero -- Mods
Please log in to shout.


Members Online: jun3hong