Hi guys, you've come up big for me in the past, and I'm hoping that's still the case!
I'm working on an RTS and I've always wondered, how would it be possible to make the viking land while moving, similar to how it is seen in the Heart of the Swarm trailer? I have limited experience with the editor, so if anybody has any ideas on how to implement this, I would greatly appreciate it!
You change the landing stage to instant and add a "pre-stage" which lasts for the usual landing time during which it appears to land. Do note that it might be displaced strangely at the last second when actual landing occurs as it desperately attempts to find a free landing spot.
I'm just looking for a way to make the viking able to move while it does its landing animation. Everything I have tried in the past just made it land instantly and skip the animation. Any ideas?
I decided to take on this challenge for the fun of it. And I've got it working! Unfortunately, it doesn't seem possible without triggers. I'll walk you through the changes I made.
First, make a Behavior - Buff called "Viking Glide". In it, set Deceleration Multiplier to 0.01.
(This will make the viking keep moving while it's not actively trying to move. It practically stops it from decelerating.)
Then, make an Effect - Apply Behavior called "Viking Glide". Make it apply the behavior "Viking Glide" that you made.
Also make an Effect - Remove Behavior called "Viking Land". Make it remove the behavior "Viking Glide" that you made.
Go to Abilities tab. Go to "Viking - Assault Mode". Here's where the most important of the changes take place.
Under Stats, uncheck "Wait Until Stopped".
(The morph can now activate while the viking is still moving.)
Under Ability right-click Ability Info - "Viking (Assault Mode)" and click "Modify..."
Go to Info - Sections - Durations and make these changes:
Change Abilities - Duration from 0 to 2.34
Change Mover - Delay from 0.533 to 2.34
Change Mover - Duration from 1.2 to 0
(The viking seems to stop moving when the mover changes from flying to ground. Getting rid of the duration and increasing the delay makes it so this movement-stopping change doesn't happen until the ability is over.)
(Giving the ability a duration fixes problems with the viking instantly landing. It also provides us with a convenient way to apply and remove the behavior. Which brings us to the next step.)
Go to Info - Sections - Effects. Make these changes:
Put the "Viking Glide" effect in Abilities - Start.
Put the "Viking Land" effect in Abilities - Finish.
(The viking will now glide while it's landing, and move normally again after the landing is complete.
Now, we only have to put in a couple of triggers to facilitate the correct height change. We need two triggers, as follows:
Viking Land
Event: Unit - Any Unit uses Viking - Assault Mode at Morph 13 - Abilities Start stage. (Ignore shared abilities.)
Action: Unit - Change (Triggering Unit) height to (Viking (Assault Mode)) Height over 2.34 seconds.
Viking Takeoff
Event: Unit - Any Unit uses Viking - Fighter Mode at Morph 15 - Mover Start stage. (Ignore shared abilities.)
Action: Unit - Change (Triggering Unit) height to (Viking (Assault Mode)) Height over 0 seconds.
(When the Viking is ordered to land, the trigger makes it smoothly lower as it glides. Then the switch in movers takes over and the morph is complete. When the viking is ordered to liftoff again, we wait until the mover begins to transition to flying. Then we instantly set its height to its ground height. The reason we use the ground height instead of the air height is because the Viking will continue to lift-off relative to the height we set. So if, at the beginning of its transition from ground to air, we set it to ground height, it will smoothly transition to air again.)
Attached is an example map I put this together on. Good luck!
Theoretically, it should be possible to make it even more like the Viking landing in the intro video. I haven't tried this yet. But theoretically, if you extend the duration of the ability and the delay of the mover, and you leave the triggers the same, the Viking should slide on the ground for a little bit before it becomes a ground unit. You could then put in something that makes puffs of dirt at its feet to help it appear to be sliding on the ground.
You could even go a step further and make it rotate towards an enemy and shoot it. But I don't know how that would work. I don't know if the rotation would change its direction. And for shooting, I don't know how you'd get the attack to fire during a morph. Just enabling the ability probably won't be enough. Enabling the move ability didn't work when I tried it. That only allowed me to interrupt the morph while it hadn't started yet.
EDIT: I used triggers because behaviors can let you change height, but they don't allow for negative heights. ...I suddenly wonder if height in behaviors is relative or absolute? I'd assumed relative...
EDIT EDIT: Like someone else mentioned, you could have troubles with it depending on where you land the viking. It's considered an air unit until the very end of the animation, so it could bug out if it lands on something a ground unit can't go on.
A targeted ability could make the viking "launch itself" as a missile and have it morph to ground mode when it hits the target spot. This way it can check for free space much like Viper's abduct. You would have to make the animation play during missile phase.
Hi guys, you've come up big for me in the past, and I'm hoping that's still the case!
I'm working on an RTS and I've always wondered, how would it be possible to make the viking land while moving, similar to how it is seen in the Heart of the Swarm trailer? I have limited experience with the editor, so if anybody has any ideas on how to implement this, I would greatly appreciate it!
Thanks, Armada
You change the landing stage to instant and add a "pre-stage" which lasts for the usual landing time during which it appears to land. Do note that it might be displaced strangely at the last second when actual landing occurs as it desperately attempts to find a free landing spot.
Sorry, I'm an idiot, can you go into more detail on how to do this?
Bump!
So what do you want exactly?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
I'm just looking for a way to make the viking able to move while it does its landing animation. Everything I have tried in the past just made it land instantly and skip the animation. Any ideas?
I decided to take on this challenge for the fun of it. And I've got it working! Unfortunately, it doesn't seem possible without triggers. I'll walk you through the changes I made.
First, make a Behavior - Buff called "Viking Glide". In it, set Deceleration Multiplier to 0.01.
(This will make the viking keep moving while it's not actively trying to move. It practically stops it from decelerating.)
Then, make an Effect - Apply Behavior called "Viking Glide". Make it apply the behavior "Viking Glide" that you made. Also make an Effect - Remove Behavior called "Viking Land". Make it remove the behavior "Viking Glide" that you made.
Go to Abilities tab. Go to "Viking - Assault Mode". Here's where the most important of the changes take place.
Under Stats, uncheck "Wait Until Stopped".
(The morph can now activate while the viking is still moving.)
Under Ability right-click Ability Info - "Viking (Assault Mode)" and click "Modify..."
Go to Info - Sections - Durations and make these changes:
(The viking seems to stop moving when the mover changes from flying to ground. Getting rid of the duration and increasing the delay makes it so this movement-stopping change doesn't happen until the ability is over.)
(Giving the ability a duration fixes problems with the viking instantly landing. It also provides us with a convenient way to apply and remove the behavior. Which brings us to the next step.)
Go to Info - Sections - Effects. Make these changes:
(The viking will now glide while it's landing, and move normally again after the landing is complete.
Now, we only have to put in a couple of triggers to facilitate the correct height change. We need two triggers, as follows:
Viking Land
Event: Unit - Any Unit uses Viking - Assault Mode at Morph 13 - Abilities Start stage. (Ignore shared abilities.)
Action: Unit - Change (Triggering Unit) height to (Viking (Assault Mode)) Height over 2.34 seconds.
Viking Takeoff
Event: Unit - Any Unit uses Viking - Fighter Mode at Morph 15 - Mover Start stage. (Ignore shared abilities.)
Action: Unit - Change (Triggering Unit) height to (Viking (Assault Mode)) Height over 0 seconds.
(When the Viking is ordered to land, the trigger makes it smoothly lower as it glides. Then the switch in movers takes over and the morph is complete. When the viking is ordered to liftoff again, we wait until the mover begins to transition to flying. Then we instantly set its height to its ground height. The reason we use the ground height instead of the air height is because the Viking will continue to lift-off relative to the height we set. So if, at the beginning of its transition from ground to air, we set it to ground height, it will smoothly transition to air again.)
Attached is an example map I put this together on. Good luck!
@Amaroq64: Go
Wow. If this was reddit, I'd give you gold. Thanks so much!
You're very welcome! Glad you like it. :)
Theoretically, it should be possible to make it even more like the Viking landing in the intro video. I haven't tried this yet. But theoretically, if you extend the duration of the ability and the delay of the mover, and you leave the triggers the same, the Viking should slide on the ground for a little bit before it becomes a ground unit. You could then put in something that makes puffs of dirt at its feet to help it appear to be sliding on the ground.
You could even go a step further and make it rotate towards an enemy and shoot it. But I don't know how that would work. I don't know if the rotation would change its direction. And for shooting, I don't know how you'd get the attack to fire during a morph. Just enabling the ability probably won't be enough. Enabling the move ability didn't work when I tried it. That only allowed me to interrupt the morph while it hadn't started yet.
EDIT: I used triggers because behaviors can let you change height, but they don't allow for negative heights. ...I suddenly wonder if height in behaviors is relative or absolute? I'd assumed relative...
EDIT EDIT: Like someone else mentioned, you could have troubles with it depending on where you land the viking. It's considered an air unit until the very end of the animation, so it could bug out if it lands on something a ground unit can't go on.
A targeted ability could make the viking "launch itself" as a missile and have it morph to ground mode when it hits the target spot. This way it can check for free space much like Viper's abduct. You would have to make the animation play during missile phase.
@SoulFilcher: Go
Oh man this is a cool idea too. You could implement Yaw and Roll too, to make it look like it's flipping around like in the trailer!