I want to create a unit which can switch between moving and being a stationary point defense drone.
So I created two units, one for the mobile form and one for the stationary form. Each of them works individually, being able to move and block shots respectively. But I can't get the morphing ability to work!
What I've done:
Created the two custom units.
Created two morph abilities, one for mobile-to-stationary and one for the reverse. I used the siege tank abilities as a comparison, but I don't see any important differences anymore.
Added 'morphto/from -> create/destroy' events to the actors of my custom units. I don't think the actors are the problem, because the issue is not purely visual.
Given my custom units their respective transition ability and added a command card button for the abilities.
What happens:
Trying to morph from mobile to stationary results in the unit turning and pausing for a few seconds (with the button dulled as if active) then going back to normal (instead of morphing). As if I had cancelled the morph.
Trying to morph from stationary to mobile is the same, except if any shots have been blocked the button stays dulled until I tell the unit to stop.
I have no idea what I've done wrong. I'm new to the data editor, so it's probably something trivial.
Props for your accurate description.
However, I cannot imagine, what exactly went wrong here. Usually for most people, the morphing actors cause problems; if those work fine for you, the rest should be easy. If it is a trivial thing, I didn't run into it yet.
Would you mind attaching the map (or creating a simple example map) to show the problem?
It seems like you mixed up the abilities. The Switch to cover mode ability actually morphs the unit into MPDD Carry Mode and vice-versa.
€ also, there seems to be an issue with the actors, the morph technically works after changing it, but the actor does not seem to change.
€€ ok, the actor changes, but you sort of messed up the animation. On morph to cover mode, you play the burrow animation. But also on morph to cover mode, you clear the burrow animation again.
I suggest, that you destroy the carry mode actor on morph cover start and create it on morph carry end. For the cover mode, create it at morph cover start and destroy at morph carry end. At actor creation, play the burrow animation (check play forever and non looping, like you did). At morph carry start, play unburrow (you can clear burrow, but it shouldn't be necessary).
€€€ attached the map with the changes mentioned. Since I did the changes anyway, to test, if what I am saying works, I might as well show it ;)
Note, that the animation speeds differ, because one animation starts at ActorCreation, causing the automated time scale to play at 100% speed, while the other animation is started by the morph ability, causing it to pick the duration you specified in the morph ability. You can easily adjust these times, of course.
You can also use the morph ability to start the animation, but then you will need a new event for UnitBirth, if this unit can be placed directly without morphing it, where you would need to modify the animation speed anyway, then.
I gonna neckro the thread, as i also have some issues with the Unit morphing. The Morphing animations don't wanna work properly, to be more precise, it randomly works perfect, then next, randomly not, only show the two end states. The unit is the SS_Battlecruiser based.
What i done:
-Created two units, Assault mode and Artillery mode
-Unit's funtion perfectly on there own
-Morph Abilities done and working
-Command card and button working
-Morph even happens, but animation dosen't work out
I'm sure, by read the above, the issue is the animation, but been playing around this for awhile and couldn't get it work right that the Morph animation happens, and carried out flawlessly.
If some one could help me fix this one would be a great help, as simply no idea where i've gone wrong in the process of setting up with the transformation actors.
I want to create a unit which can switch between moving and being a stationary point defense drone.
So I created two units, one for the mobile form and one for the stationary form. Each of them works individually, being able to move and block shots respectively. But I can't get the morphing ability to work!
What I've done:
What happens:
I have no idea what I've done wrong. I'm new to the data editor, so it's probably something trivial.
Props for your accurate description.
However, I cannot imagine, what exactly went wrong here. Usually for most people, the morphing actors cause problems; if those work fine for you, the rest should be easy. If it is a trivial thing, I didn't run into it yet.
Would you mind attaching the map (or creating a simple example map) to show the problem?
@Kueken531:
No, I don't mind attaching it. This is like the first thing I've tried to do, so it's already just a bunch of units standing around for testing.
The unit in question is the MPDD. Just filter by the map data and it should be the only non-melee-or-campaign stuff.
It seems like you mixed up the abilities. The Switch to cover mode ability actually morphs the unit into MPDD Carry Mode and vice-versa.
€ also, there seems to be an issue with the actors, the morph technically works after changing it, but the actor does not seem to change.
€€ ok, the actor changes, but you sort of messed up the animation. On morph to cover mode, you play the burrow animation. But also on morph to cover mode, you clear the burrow animation again.
I suggest, that you destroy the carry mode actor on morph cover start and create it on morph carry end. For the cover mode, create it at morph cover start and destroy at morph carry end. At actor creation, play the burrow animation (check play forever and non looping, like you did). At morph carry start, play unburrow (you can clear burrow, but it shouldn't be necessary).
€€€ attached the map with the changes mentioned. Since I did the changes anyway, to test, if what I am saying works, I might as well show it ;)
Note, that the animation speeds differ, because one animation starts at ActorCreation, causing the automated time scale to play at 100% speed, while the other animation is started by the morph ability, causing it to pick the duration you specified in the morph ability. You can easily adjust these times, of course.
You can also use the morph ability to start the animation, but then you will need a new event for UnitBirth, if this unit can be placed directly without morphing it, where you would need to modify the animation speed anyway, then.
@Kueken531:
Ah, so it was a stupid mistake. Thanks for the fresh eyes.
Once the transition was fixed the actor problems were easy to notice and fix.
I'm still having a problem, though. If the MPDD has blocked any shots (i.e. attacked) it refuses to transform back to carry mode!
I'd also like to attach a normal PDD model to float above the cover mode actor and be the origin of the weapon beams but don't know where to start.
I gonna neckro the thread, as i also have some issues with the Unit morphing. The Morphing animations don't wanna work properly, to be more precise, it randomly works perfect, then next, randomly not, only show the two end states. The unit is the SS_Battlecruiser based.
What i done:
-Created two units, Assault mode and Artillery mode
-Unit's funtion perfectly on there own
-Morph Abilities done and working
-Command card and button working
-Morph even happens, but animation dosen't work out
I'm sure, by read the above, the issue is the animation, but been playing around this for awhile and couldn't get it work right that the Morph animation happens, and carried out flawlessly.
If some one could help me fix this one would be a great help, as simply no idea where i've gone wrong in the process of setting up with the transformation actors.