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:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
[2024-4-20. : 7:56 pm]
Oh_Man -- lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
Please log in to shout.


Members Online: Roy, Amendo03