Note: 1.5 alpha added a new effect: Redirect Missile. But it isn't what this small tutorial going to talk about. We are talking about the "Launch Missile" effect, which is existed in day 1 of SC2, but got some improvment in 1.5
So, before 1.5, how do we create abilities like the "Hooks" in DotA?
Quote:
Using "Force" effect?
The disadvantage of the "Force" effect is
1.Can't pass though obstacles
2.Limited by target units' max speed
3.Need to be used constantly(per 0.0625s), which is not good for the performance.
So, basicly you can't drag a unit through a cliff, which is very unsatisfactorily.
Using triggers(or "teleport" effect) to move unit?
There will be performance issue (needs to move unit per 0.0625s), and if you want to simulate parabola, the codes can be complicated. (And I don't like using triggers to create abilities)
Just move the units to target point, then use actor to create a dummy "launch" visual effect ?
Not perfect enough.
Ideally, if we can convert the existed unit to a missile, and then launch it to target location, it would be very convenient to create "Hook" or "Jump" like abilites.
Now, in 1.5 alpha, you can use the "Launch Missile" effect to launch a existed unit, and specify the Mover you want it to use when it is flying. That is to say, you can convert a existed unit to a missile.
In fact, as some of you may have noticed: You can already do it partly before 1.5.
Just remove the "Ammo Unit" field of your Launch Missile effect, and set the "Movers" field to the movers you want it to use, then, the effect would automatically use the unit in its "Launch Location" field (if it is a unit) as its missile and directly launch it.
But In general, when a missile impact the target, it would simple die. The problem is we are creating a "Hook" ability, we certainly don't want the target die imediatly after we drag it to the caster. So what should we do?
OK, here is another trick: we just modify the missile effect's "Death Type" field to "Unkown". Then the missile simply wouldn't die after it hit the target point. So we can launch a existed unit and keep it alive after impact the target point - exactly what we want :)
But - before 1.5, there is a bug here: Once you convert a unit into a missile, its original mover simply wouldn't come back. So just like every missile, the launched unit will stuck in the place after it impacted the target, can't move, can't do anything.
And it is so good that 1.5 alpha fixed this. Every missile unit would reset its Mover to its default mover after it hit the target (or after the missile mover timeout) . So, if you convert a normal unit into a missile, it will convert back to normal units after it hits target point (or after timeout).
Now, it is become easy to make "Hook" ability. We just need to make a effect which will launch the hook, and after the hook impact the target, we just need to launch the target unit to the caster unit's location...
I made a sample map for this. And here is the details of the core effect of the "Hook" abil in the map:
Since the unit we want to launch is the target unit of the whole ability, so I set "LaunchLocation" to "TargetUnit", and "ImpactLocation" is "Caster Point". And set the Movers field to a mover("HookedVictim") created by me.
I set the DeathType to Unknown to prevent "death by impact".
You may want to ask: Why set the flag "2D" to 1(True)?
You may found it in the video below, that after the Battlecruiser in the video launched itself to the target, it would keep its height when it impacted the target point (so if targe is a ground unit, its height would become 0), it is certainly not perfect enough. And the "2D" flag is used to tell the missile to "ignore the height of the target point", so it could ensure that the missile would retain its height after impact.
It still isn't a perfect "Hook" effect if we only do what I said above. If there is not enough room around the Caster, there could be result in the target unit stuck in the cliff or inside another unit. In general, we can avoid similar issue by create a "place holder" unit beside the caster. But we got lucky that there is a "Placement" flag in the Launch Missile effect, we just need check this flag, and set the "PlacementRange" field to a suitable value (I chose "3" here, so, if there is no placable point in the 3 range near its assigned impact location, the effect would automatically cancel itself; and if it is placable, then the missile would be launched to the placable location directly, instead of impact the center of the caster unit)
There is a Infestor and a Battlecruiser in the map. Infester can drag any target unit (Air or Ground) to its place (without change the target's height). While the BC can launch itself to the target unit (will change the height of BC). Just use their abilites to do the test.
Note: Currently you can only use the "Launch Missile" effect to dynamicly change a existed unit's mover to a "missile type" mover. It could not be use to attach non-missile movers, for example: try change a ground unit's mover to Fly, and you will recive a error message.
And do not to check the "Return" flag if you want to launch a existed unit. This would cause the game crash in 1.5 alpha, since it cannot find the place to return.
This is great news! I had already used the method but for a suicidal unit, so I didn't habe problems with the current bugs you mentioned. There's the Viper's ability working perfectly. Very good.
We can also use the "Impact Offset" field to future polish the impact location.
In the video, you can see the hooked victims landed beside of the Infestor. But sometimes, we may want the draged target to land "in front of" the Caster, what should we do?
We can modify the "Impact Offset" field to do this: the offset is based on the impacted unit's (in this case, the caster's) facing. So if we want the missile to land "in front of" the caster, we just need to set its Y offset to a suitable "positive" value ( for example : [0, 1, 0] or [0, 0.5, 0] etc), then the target would always land in front of the caster (provide there is a placable location in front of the caster.)
Very nice. That was something i expected from this patch cuz making trigger/morph abilities for making simple jump sucks. Anyone saw something that allows you to make unit/actor orbit around another unit (like lighting shield visual from warcraft 3) without triggers? I saw such stuff in blizzard dota video.
If you are talking about the Modify Unit effect. It could only modify the unit's height not the actual mover.
In fact before 1.5 you can use Launch Missile to change Ground mover to Fly, but there are similar bugs as I said above, which make that trick impractical
Very nice. That was something i expected from this patch cuz making trigger/morph abilities for making simple jump sucks. Anyone saw something that allows you to make unit/actor orbit around another unit (like lighting shield visual from warcraft 3) without triggers? I saw such stuff in blizzard dota video.
You can already do it before 1.5. There are many ways to do it. For example you can use a Turret actor to spin a invisable model, and then attach your actor to the invisable model with a local offset Op
i know it but this approaches suck. I'm sure there are more suitable ways to do it. Just thought someone already discovered some new actor stuff in 1.5
Thats nice. Thanks for your little investigation :). I didnt get involved in closed beta so i'm just downloading open beta client right now and will check new stuff myself. I'm also interested in some convenient ways to make a critical strike and special animation for it like in wc3's blademaster.
Didn't find anything for making critical strike even with this patch :/. There is still lack of pass chance validator or some options in switch effect that allows to make special strikes for weapons :/. btw found a lot of new actor types and rotator too. Do you know what impulse actors do?
I'm also curious if there will be just arcade update for wings of liberty or HotS will come with this patch :/ ?
impulse actor are "actor forces" which can be used to do physic things in engine (it only affect the visual layer of course).
I plan to create a tutorial or a sample map about the actor physic engine, but it maybe better to wait for the Startools. Becasue we need to modify the model files themselves to fully express its potential
Would it be possible to have the battlecruiser choose keep going past its target in the same direction? And for it to ignore the terrain height? (I'm guessing I can just hit the ignore terrain height flag) So that it flies in the straight direction you choose and continue on for awhile
edit: I set the flags to the battlecruiser to ignore terrain height, but it appears that when it is launched it doesn't ignore the height. Any fix to this as well?
Would it be possible to have the battlecruiser choose keep going past its target in the same direction? And for it to ignore the terrain height? (I'm guessing I can just hit the ignore terrain height flag) So that it flies in the straight direction you choose and continue on for awhile
edit: I set the flags to the battlecruiser to ignore terrain height, but it appears that when it is launched it doesn't ignore the height. Any fix to this as well?
Of course. You have multiple way to do this, for examle you can use the "Impact Offset" field or modify the missile mover it used to launch itself.
You can also modify your mover to set if it would ignore the terrain height. When the battlecruiser launchs, it would use the missile mover and not its default mover.
I tried to make this exact thing work for hours and hours pre-1.5 and I got exactly as far as you did. But as you say, it was simply not possible to reset the mover. Great change and nice tutorial.
Hello there, thanks for this I was probing at how to make this work as soon as the patch came out, but I was using unlink in the death type field thinking maybe that's how you stopped the effect from killing the missile :-/ lol.
One thing I noticed is that the hook to me missile moves like its homing in on the tentacle, I looked in the sample map and there are 2 lines in the actor for the neural parasite tentacle that refer to the "hook launch to me" effect, could you explain those in a little detail?
Hello there, thanks for this I was probing at how to make this work as soon as the patch came out, but I was using unlink in the death type field thinking maybe that's how you stopped the effect from killing the missile :-/ lol.
One thing I noticed is that the hook to me missile moves like its homing in on the tentacle, I looked in the sample map and there are 2 lines in the actor for the neural parasite tentacle that refer to the "hook launch to me" effect, could you explain those in a little detail?
Its just a cooperate with the default "SiphonTentacle" actor.
First I create a SiphonTentacleImpactHoldingSite to attach it to the position of the missile.
Then set it to a reference, which the tentacle's end would automaticly attached to.
This looks great! My interest in this is creating a "Jump" ability so I played around with the battlecruiser. What I found was that when it launches itself (or jumps) it drops to the height of the terrain, which looks kinda funky, especially as it climbs the cliff. It still seems to move like an air unit though, which is good.
What I also noticed though is that, after jumping, if the infestor hooks it, it regains its air height. Could you perhaps explain why this might happen or if I would see a similar problem with ground units?
Edit: Applied the ability to a ground unit, no such visual effect occurs!
Also, when I attempt to make the BC jump to a location instead of a unit (changed impact target to Unit/Point) it still tells me must target unit, is there a fix for this? I also removed the Damage effect from the BC.
Edit: Okay never mind, removed the validators, this part works now.
I noticed a very important bug in the hook ability and I fixed it. If an air caster tries to hook a ground unit while standing on unpathable gorund (ie water) the ability will fail to hook the unit and pull it. To fix this issue it's necessary to check the 'Placement Ignores Cliff Test' flag, so the effect uses the Placeholder unit location and Placement Range value.
A little explanation on how these fields work: The placeholder unit is created at the impact location (in tihs case the caster) but if it can't be placed there it is placed at the closest possible point within the placement range, just like in a Create Unit effect. This way if you set up a ground placeholder unit and a placement range almost as long as the ability's range, a ground unit will always find a valid impact location.
I hope it helps.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Note: 1.5 alpha added a new effect: Redirect Missile. But it isn't what this small tutorial going to talk about. We are talking about the "Launch Missile" effect, which is existed in day 1 of SC2, but got some improvment in 1.5
So, before 1.5, how do we create abilities like the "Hooks" in DotA?
Ideally, if we can convert the existed unit to a missile, and then launch it to target location, it would be very convenient to create "Hook" or "Jump" like abilites.
Now, in 1.5 alpha, you can use the "Launch Missile" effect to launch a existed unit, and specify the Mover you want it to use when it is flying. That is to say, you can convert a existed unit to a missile.
In fact, as some of you may have noticed: You can already do it partly before 1.5.
Just remove the "Ammo Unit" field of your Launch Missile effect, and set the "Movers" field to the movers you want it to use, then, the effect would automatically use the unit in its "Launch Location" field (if it is a unit) as its missile and directly launch it.
But In general, when a missile impact the target, it would simple die. The problem is we are creating a "Hook" ability, we certainly don't want the target die imediatly after we drag it to the caster. So what should we do?
OK, here is another trick: we just modify the missile effect's "Death Type" field to "Unkown". Then the missile simply wouldn't die after it hit the target point. So we can launch a existed unit and keep it alive after impact the target point - exactly what we want :)
But - before 1.5, there is a bug here: Once you convert a unit into a missile, its original mover simply wouldn't come back. So just like every missile, the launched unit will stuck in the place after it impacted the target, can't move, can't do anything.
And it is so good that 1.5 alpha fixed this. Every missile unit would reset its Mover to its default mover after it hit the target (or after the missile mover timeout) . So, if you convert a normal unit into a missile, it will convert back to normal units after it hits target point (or after timeout).
Now, it is become easy to make "Hook" ability. We just need to make a effect which will launch the hook, and after the hook impact the target, we just need to launch the target unit to the caster unit's location...
I made a sample map for this. And here is the details of the core effect of the "Hook" abil in the map:
Since the unit we want to launch is the target unit of the whole ability, so I set "LaunchLocation" to "TargetUnit", and "ImpactLocation" is "Caster Point". And set the Movers field to a mover("HookedVictim") created by me.
I set the DeathType to Unknown to prevent "death by impact".
You may want to ask: Why set the flag "2D" to 1(True)?
You may found it in the video below, that after the Battlecruiser in the video launched itself to the target, it would keep its height when it impacted the target point (so if targe is a ground unit, its height would become 0), it is certainly not perfect enough. And the "2D" flag is used to tell the missile to "ignore the height of the target point", so it could ensure that the missile would retain its height after impact.
It still isn't a perfect "Hook" effect if we only do what I said above. If there is not enough room around the Caster, there could be result in the target unit stuck in the cliff or inside another unit. In general, we can avoid similar issue by create a "place holder" unit beside the caster. But we got lucky that there is a "Placement" flag in the Launch Missile effect, we just need check this flag, and set the "PlacementRange" field to a suitable value (I chose "3" here, so, if there is no placable point in the 3 range near its assigned impact location, the effect would automatically cancel itself; and if it is placable, then the missile would be launched to the placable location directly, instead of impact the center of the caster unit)
You can download the sample map here:
http://www.sc2mapster.com/media/attachments/27/725/1.5Hook-LaunchExistedUnit.SC2Map
There is a Infestor and a Battlecruiser in the map. Infester can drag any target unit (Air or Ground) to its place (without change the target's height). While the BC can launch itself to the target unit (will change the height of BC). Just use their abilites to do the test.
Note: Currently you can only use the "Launch Missile" effect to dynamicly change a existed unit's mover to a "missile type" mover. It could not be use to attach non-missile movers, for example: try change a ground unit's mover to Fly, and you will recive a error message.
And do not to check the "Return" flag if you want to launch a existed unit. This would cause the game crash in 1.5 alpha, since it cannot find the place to return.
This is great news! I had already used the method but for a suicidal unit, so I didn't habe problems with the current bugs you mentioned. There's the Viper's ability working perfectly. Very good.
In addition:
We can also use the "Impact Offset" field to future polish the impact location.
In the video, you can see the hooked victims landed beside of the Infestor. But sometimes, we may want the draged target to land "in front of" the Caster, what should we do?
We can modify the "Impact Offset" field to do this: the offset is based on the impacted unit's (in this case, the caster's) facing. So if we want the missile to land "in front of" the caster, we just need to set its Y offset to a suitable "positive" value ( for example : [0, 1, 0] or [0, 0.5, 0] etc), then the target would always land in front of the caster (provide there is a placable location in front of the caster.)
Very nice. That was something i expected from this patch cuz making trigger/morph abilities for making simple jump sucks. Anyone saw something that allows you to make unit/actor orbit around another unit (like lighting shield visual from warcraft 3) without triggers? I saw such stuff in blizzard dota video.
Pre 1.5 alpha, I think there is a modify unit effect that allows mover change.
If you are talking about the Modify Unit effect. It could only modify the unit's height not the actual mover.
In fact before 1.5 you can use Launch Missile to change Ground mover to Fly, but there are similar bugs as I said above, which make that trick impractical
You can already do it before 1.5. There are many ways to do it. For example you can use a Turret actor to spin a invisable model, and then attach your actor to the invisable model with a local offset Op
i know it but this approaches suck. I'm sure there are more suitable ways to do it. Just thought someone already discovered some new actor stuff in 1.5
@abvdzh: Go
Yep, there is a new actor siteOp in 1.5 called CActorSiteOpRotator.
It is very easy to be used to create lighting shield like things. You can try it :)
Thats nice. Thanks for your little investigation :). I didnt get involved in closed beta so i'm just downloading open beta client right now and will check new stuff myself. I'm also interested in some convenient ways to make a critical strike and special animation for it like in wc3's blademaster.
Didn't find anything for making critical strike even with this patch :/. There is still lack of pass chance validator or some options in switch effect that allows to make special strikes for weapons :/. btw found a lot of new actor types and rotator too. Do you know what impulse actors do?
I'm also curious if there will be just arcade update for wings of liberty or HotS will come with this patch :/ ?
impulse actor are "actor forces" which can be used to do physic things in engine (it only affect the visual layer of course).
I plan to create a tutorial or a sample map about the actor physic engine, but it maybe better to wait for the Startools. Becasue we need to modify the model files themselves to fully express its potential
Would it be possible to have the battlecruiser choose keep going past its target in the same direction? And for it to ignore the terrain height? (I'm guessing I can just hit the ignore terrain height flag) So that it flies in the straight direction you choose and continue on for awhile
edit: I set the flags to the battlecruiser to ignore terrain height, but it appears that when it is launched it doesn't ignore the height. Any fix to this as well?
Of course. You have multiple way to do this, for examle you can use the "Impact Offset" field or modify the missile mover it used to launch itself.
You can also modify your mover to set if it would ignore the terrain height. When the battlecruiser launchs, it would use the missile mover and not its default mover.
There is a official tutorial about the missile mover. http://us.battle.net/sc2/en/game/maps-and-mods/tutorials/missile-movers/
I tried to make this exact thing work for hours and hours pre-1.5 and I got exactly as far as you did. But as you say, it was simply not possible to reset the mover. Great change and nice tutorial.
Hello there, thanks for this I was probing at how to make this work as soon as the patch came out, but I was using unlink in the death type field thinking maybe that's how you stopped the effect from killing the missile :-/ lol.
One thing I noticed is that the hook to me missile moves like its homing in on the tentacle, I looked in the sample map and there are 2 lines in the actor for the neural parasite tentacle that refer to the "hook launch to me" effect, could you explain those in a little detail?
Its just a cooperate with the default "SiphonTentacle" actor.
First I create a SiphonTentacleImpactHoldingSite to attach it to the position of the missile.
Then set it to a reference, which the tentacle's end would automaticly attached to.
This looks great! My interest in this is creating a "Jump" ability so I played around with the battlecruiser. What I found was that when it launches itself (or jumps) it drops to the height of the terrain, which looks kinda funky, especially as it climbs the cliff. It still seems to move like an air unit though, which is good.
What I also noticed though is that, after jumping, if the infestor hooks it, it regains its air height. Could you perhaps explain why this might happen or if I would see a similar problem with ground units?
Edit: Applied the ability to a ground unit, no such visual effect occurs!
Also, when I attempt to make the BC jump to a location instead of a unit (changed impact target to Unit/Point) it still tells me must target unit, is there a fix for this? I also removed the Damage effect from the BC.
Edit: Okay never mind, removed the validators, this part works now.
I noticed a very important bug in the hook ability and I fixed it. If an air caster tries to hook a ground unit while standing on unpathable gorund (ie water) the ability will fail to hook the unit and pull it. To fix this issue it's necessary to check the 'Placement Ignores Cliff Test' flag, so the effect uses the Placeholder unit location and Placement Range value.
A little explanation on how these fields work: The placeholder unit is created at the impact location (in tihs case the caster) but if it can't be placed there it is placed at the closest possible point within the placement range, just like in a Create Unit effect. This way if you set up a ground placeholder unit and a placement range almost as long as the ability's range, a ground unit will always find a valid impact location.
I hope it helps.