Advanced          Random


Customized Projectiles
Author: ProzaicMuze (sc2mapster.com)Tags: advanced data mover  
Source: http://forums.sc2mapster.com/resour...Added 8 years ago 

WARNING: You are expected to know how to make a missile and change its mover. This tutorial won't be covering how to make missiles, custom launch sites or cool effects. Those can be found in Actor, Site Operation and Spell tutorials. We will instead be creating custom movers that control how the missile moves. This is something a lot of mappers have been struggling with and is largely unknown in terms of hard details. I, too, can't figure out certain mover fields, but I have discovered ways to create movers that will accomplish most things you would want. If you can provide information on a field I'm missing, please PM me with details so that I can update this tutorial :)

Example map: (link)


Mover Basics

I'd like to think it's fairly obvious that movers move things. If not. . . well. . . *facepalm*

But seriously, these are very simple to understand and implement. The difficult part is configuring them to do exactly what you want. This is because the fields often lack clear explanations and control a wide range of aspects that sometimes aren't significant enough to make any real changes. In some cases you'll have fields that require another unrelated field to have a specified value in order to work. Thus you'll be trying to change a mover's Speed only to realize that its missile isn't going to move until you've given it Orientation or messed with the Throw Band Yaw (don't worry, I have no idea what that is either).

For the purposes of this tutorial, we'll only be covering Missile Movers and ignoring the other types. Those types are typically used for controlling how a unit moves and its pathing. We won't need any of that for our missiles. Before we dive in, you need to understand what Overlays and Phases are, and how they relate to each other.

Motion Overlays

Think of these as movement patterns. If you have a missile traveling along a given line, overlays would change how the missile moves along that line. Thus if you want to make spirals or zig-zag motions, this is where you'd do that.

Revolvers

If you want your missile to spiral around its axis of fire (the line between its launch point and its impact point) this is how.

Revolver Acceleration: The acceleration of motion around the axis.
Revolver Maximum Speed: The max speed of motion around the axis.
Revolver Speed: The speed of motion around the axis.

Waves

If you want your missile to zig-zag across its axis of fire (the line between its launch point and its impact point) this is how.

Axis: The direction waves move in relation to the missile's path.

Polarity: Determines what direction the first wave travels.
Wavelength: The size of each wave.

Motion Phases

Before you can make use of Overlays you need to have movement types to apply them to. That's what these are. They determine what kind of motion the mover will simulate when traveling to the target. Most importantly, you can chain them together to make a series of movements. This is the key to customizing your movers. However, in order to do this you need to understand the new terminology:

Keep this in mind as the fields will constantly switch between the Cartesian coordinate system and flight dynamics.



Index

(I have included a map with examples of each of these that you can reference while reading)



Accelerating Missiles

Example - (Seeker Missile)

1st Motion Phase:

This first phase simulates the brief moment a missile acquires its target before racing after it. The higher the Stop - Base, the longer this phase lasts. Outro is directly related to a phases length and controls the smoothness of transitions. In order to track a target you MUST have Orientation values. These are responsible for whether or not a missile can turn to follow its target. No values means no tracking means buggy missiles.

2nd Motion Phase:

This phase occurs after the Outro from the 1st phase ends, ramping up to quickly close in on the target.

Other Important Fields

Speed: If you want to specify a starting speed to accelerate from, you need to put that value in this field.
Timeout: If you want to make a missile that slowly tracks a target before dying, this is one method of doing so. Once this timer expires the mover disappears, typically killing the missile as well.



Parabolic Arcs (Dynamic)

Example - (Mortar/Grenade)

1st Motion Phase:

This first phase controls the upward curve to the apex of the arc. The Outro is responsible for how high this arc is and the Throw Vector determines what direction the arc curves towards.

2nd Motion Phase:

This phase controls the forward curve at the top of the arc before descending again. The Outro is responsible for how long this arc is and starts right as the previous phase ends. The 2 in Blend - Base connects directly to the 2 in Stop - Base from the previous phase. This is how motion phases connect if you want smooth transitions between them.

3rd Motion Phase:

This phase controls the target tracking and ends the arc. It's important to note that once this phase begins the missile no longer curves and will directly track the target. You can add more curve with additional Throw Vectors, but if you want the missile to connect with the target you need to end with a Guidance Motion Phase.

Depending on the distance to the target, the arc may look strange OR double back on itself. To remedy this you can make multiple movers with different Outro values yielding shorter\longer curves. You can then determine what mover is used base on the distance to the target in the Effect - Launch Missile. With a combination of movers you can adapt your missile's arc to look great at any distance.

Other Important Fields

Acceleration: You can use this field to simulate the effects of gravity on the missile's speed during each motion phase.
Gravity: You can use this field to create a gravitational pull on the missile. It won't change the missile's speed, but it will pull the arc down to the grown for as long as the Motion Phase it has an assigned value in is active.
Outro Altitude: This field allows you to tie phase changes to specific heights meaning that the next phase won't start until the missile reaches a certain height.



Parabolic Lobs (Static)

Example - (Infested Terran)

1st Motion Phase:

I wouldn't recommend using this mover unless you have a spherical projectile you are using. This is because the mover doesn't chance the projectiles facing during flight. This looks incredibly tacky with standard missiles given that they will be moving up and down while still facing the target. That being said, this mover allows you to form perfect arcs to the target with specific heights, speeds and distances. Used intelligently this mover is incredibly powerful.

Other Important Fields

Parabola Acceleration: You can simulate the effects of gravity by setting specific acceleration rates at different points along the curve with this field.
Parabola Distance: This field determines the distance along the curve a given segment is like the apex or descent.
Timeout: Because this mover can't track targets, this field can be important if you want the missile to disappear shortly after landing.



Release Firing Missile

Example - (Viking Fighter Missiles)

1st Motion Phase:

This first field simulates the brief hang of a missile as it is released from a ship before the burn kicks it and propels it to the target. Gravity controls how much it drops during the phase while Throw Vector determines what direction it initially leaves the ship before accelerating.

2nd Motion Phase:

This field allows the missile to track the target after being fired and accelerated its speed to the desired value.

Other Important Fields

Outro Altitude: It is possible to make the missile drop until it reaches a specific height using this field.



Spiraling Missiles

Example

Motion Overlay:

This causes the missile to spiral in uniform circles around its axis of fire. The higher the speed, the tighter the circles will be and the longer it will take to reach the target. If you want the spiraling to be more sporadic, you can lower the Revolver Speed and add a Revolver Acceleration so that it spins faster and faster as it heads towards the target. Contrary to what you'd expect, this actually causes the missile to spiral arbitrarily and is an ideal method of making missile clusters flay away random patterns.

1st Motion Phase:

This first phase is used to get the missile out and away from the ship before it starts spiraling. The Throw Vector is the direction it is launched and the Outro determines how far it gets before spiraling.

2nd Motion Phase:

This phase's sole purpose is to allow the missile to track the target.

3rd Motion Phase:

This field applies the Revolver Overlay to the missile and spirals until it hits the target due to the Outro having a value of -1. It is important to note that the Driver from the previous phase persists through this phase meaning you don't need to set a new driver. If you want to change how much the Overlay affects the missile, Scale lessens or amplifies the spiraling motions.

It is entirely possible to do away with this phase and apply the Overlay to the Guidance Phase, but I prefer not to for flexibilities sake. The additional phase allows you to control the spiraling and missile movement independently.

Other Important Fields

Acceleration: If you don't want to change the Revolver Speed, you can use acceleration to speed up the missile and overcome its spiraling motion.
Gravity: This field can be added to simulate an object spiraling down from orbit to the ground.



Zig-Zag Missiles

Example

Motion Overlay:

This causes the missile to bounce back and forth along the specified axis while traveling to its target. If you want wider zig-zags, you can increase the Wavelength. You can also use Polarity to determine whether the missile bounces the same direction or alternates direction when fired.

1st Motion Phase:

This first phase is used to get the missile out and away from the ship before it starts spiraling. The Throw Vector is the direction it is launched and the Outro determines how far it gets before spiraling.

2nd Motion Phase:

This phase's sole purpose is to allow the missile to track the target.

3rd Motion Phase:

This field applies the Wave Overlay to the missile and zig-zags until it hits the target due to the Outro having a value of -1. It is important to note that the Driver from the previous phase persists through this phase meaning you don't need to set a new driver. If you want to change how much the Overlay affects the missile, Scale lessens or amplifies the spiraling motions.

It is entirely possible to do away with this phase and apply the Overlay to the Guidance Phase, but I prefer not to for flexibilities sake. The additional phase allows you to control the bouncing and missile movement independently.

Other Important Fields

Acceleration: If you don't want to change the Wavelength, you can use acceleration to speed up the missile and overcome its zig-zag motion.



Burst Missiles

This is an example group of movers that will cause multiple missiles to "bloom" outward at launch before arcing to the target. While very simple in design, you can easily add more Motion Phases or apply Motion Overlays to get the desired movement patterns and/or arcs.

Example - (Phoenix Missiles)

(Missile 1) 1st Motion Phase:

This first phase arcs the missile in the +Z (up) direction before tracking the target.

(Missile 1) 2nd Motion Phase:

This phase allows the missile to track the target.

(Missile 2) 1st Motion Phase:

This first phase arcs the missile in the +X (left) direction before tracking the target.

(Missile 2) 2nd Motion Phase:

This phase allows the missile to track the target.

(Missile 3) 1st Motion Phase:

This first phase arcs the missile in the -Z (down) direction before tracking the target.

(Missile 3) 2nd Motion Phase:

This phase allows the missile to track the target.

(Missile 4) 1st Motion Phase:

This first phase arcs the missile in the -X (right) direction before tracking the target.

(Missile 4) 2nd Motion Phase:

This phase allows the missile to track the target.



Other Fields

My examples didn't cover all of the possible fields you can edit, but some of the fields are self-explanatory like Flight Time or Timeout. However, there still many fields I can't explain very well or simply don't understand. If you have managed to figure something out that could help me improve the tutorial, I'll be adding the fields here if they don't fit into one of the above missile "themes." I'll also make new categories if you come up with something that isn't covered here. Any input is appreciated :D



Feel free to use the attached Test Map or contact me via forum post, PM or IRC (#SC2Mapster on chat.freenode.net:6667) if you encounter problems. Keep in mind that I'm a busy person so I may not reply right away, but I'll do my best to answer all questions/concerns that I am aware of :)








Star Depot
Contact      Login      Register