There area few trigger-based leap abilities around, but I hate doing the math, so I fiddled around and came up with this data-only solution. One caveat: if the landing zone isn't completely clear, the leaping unit will be teleported to the nearest clear spot - I haven't taken the time to figure out a way around this yet.Updated: Thanks to urashimakt and RileyStarcraft for ideas towards greatly improving this quirk. Landings around buildings are still funky, but other units crowding the landing zone shouldn't cause a problem.
The basic idea is that a missile is fired from the casting unit that looks like the unit itself. The casting unit's actor is hidden for the duration of the missile's flight, and then teleported and revealed at the impact point of the missile. I'm just going to stick with the necessary bits, assuming you know how to do things like set up damage and other effects of the leap.
Let's add leap to the zealot using a basic AoE knockback as the impact effect.
Knockback:
Not much to say, pretty standard stuff. (I also tacked a validator on there so that it doesn't make buildings jump - not important for the leap effect itself though)
Effect: Knocked Back (Apply Force) with type: Apply Force
Amount: 0.5
Behavior: Knocked Back with type: Buff
Modification+:
Unit:
Height: 2
Height Time: Start: 0.45, Stop: 0.45
Effect - Periodic:Knocked Back (Apply Force)
Duration: 0.9
Period: 0.01
Effect: Knocked Back (Apply Behavior) with type: Apply Behavior
Behavior:Knocked Back
Effect: Leap Impact (Search) with type: Search Area
Areas+::
Effect:Knocked Back (Apply Behavior)
Radius: 2
Exclude+: Caster
Leap Clone:
The clone is a basic missile, using the leaping unit's model.
Parabola Distance: After Apex: 0.1, Before Apex: 0.1, Land: 0.1, Launch: 0.1
Parabola Upright: Enabled
Pathing Mode: Flying
Placement: Prevent Fogged
Unit: Zealot Leap Clone with type: Projectile
Mover:Zealot Leap Clone (should already be set)
Actor: Zealot Leap Clone with type: Missile
Unit Name:Zealot Leap Clone
Model: Zealot
Leap Ability:
The ability itself is a simple projectile launch with a teleport at impact, with some collision suppression to avoid problems with crowding at the landing zone
Behavior: Collisions Suppressed with type: Buff
Modification+:
Behavior:
State Flags: Suppress Collision enabled
Duration: 0.1
Effect: Leap (Disable Collisions) with type: Apply Behavior
Behavior:Collisions Suppressed
Effect: Leap (Landing Search) with type: Search Area
Areas+::
Effect:Leap (Disable Collisions)
Radius: 1
Effect: Leap (Teleport Caster) with type: Teleport
Clear Order Queue: Disabled
Target+: Target Point
Unit+: Caster
Effect: Leap (Launch Clone) with type: Launch Missile
Impact Effect:Leap Impact (Search)
Impact Location: Target Point
Ammo Unit:Zealot Leap Clone
Effect: Leap (Set) with type: Set
Effects:Leap (Landing Search), Leap (Launch Clone), Leap (Teleport Caster) - order is important
No, but there may be a way to transfer damage from the dummy unit to the caster unit with a behavior. This is a pretty bare-bones example, just for the basics of doing a data-based leap. (I think there are still some issues to work out with a unit already under attack using the ability)
The caveat is a little unpleasant, but apart from that it looks pretty nice. Maybe there's some validator that could help? (Just throwing in a random thought)
That's assuming your target location is clear to begin with. What you can do is make a behavior that suppresses collision and give this to the leaper and all units around the leap location right at the time of teleporting. They'll all be in their correct location and sort out the collision problem when the behavior wears off.
I tested this, and the teleport effect seems to ignore the collision suppression flag in the behavior and still looks for a clear landing spot. I did however manage to work around it by adding obscene speed bonuses to the behavior, and issuing a move order to the leaper. It's hacky, but it works in most cases, except for the occasional teleport quirk near cliffs, putting the leaper on a different cliff level from the target. I kept the teleport a part of the ability to maintain the ability to jump on/off cliffs, but if cliffs aren't an issue, it could easily be replaced completely with the move order.
That's strange, I have an ability that swaps the location of two units using that no collision thing and it seems to work for that. Eventually you'll find a full-fledged solution, I'm sure.
Edit: Actually, Riley might've been on to something. What if you teleport the invisible hero first and then send the leaper missile to the location of the hero instead of the target point of the ability? It may not still go exactly where you want it, but at least the missile won't land and spawn the hero somewhere else. You'd have to launch the missile from something else other than the hero and I don't have experience with that, but I imagine it's possible. Launch Location = Source Point instead of Source Unit? Not sure if the Source Point is where the ability was first cast from or if it's always where the caster is at.
I remember that, and having tested both I'd have to say this one's purtier. That's mostly because of the parabolic mover, but it's cool to see implemented nonetheless. Two things I noted, btw:
1) I made my own parabolic mover and copied the values you listed here into them. It had some strange results occasionally, so I copied the mover from your map exactly and plugged that in, worked much better. Not sure what the difference was, but I don't think it was input error. I checked doubly!
2) The suppress collision DOES work. I was so baffled that it wouldn't that I tried it myself. Make sure that you've applied it to the leaping unit and all units near the target area BEFORE the teleport happens. Other than that I'm not sure what could mess it up!
Again, thanks. This is a really cool and simple non-trigger leap solution.
Those are both kind of strange. It's quite possible that I missed out some values for the mover - I wrote this up after the fact, not during the process. I'll try the collision suppression again. I may have only been applying it to the leap unit. Glad you found it useful/interesting, and thanks for the input!
Awesome function, i added it into my map, and the jumping and everything work fine, but... my *missile* is a white orb instead of the model, i dont know where to add that in, i know it should be stupidly easy, but i cant figure it out haha *i am kinda tired atm >.<; and inexperienced... bad combo*
Also, like i said, i am new (this would be my 4th day with using ANY editor ever) how would i add an effect like:
Adds a buff that increases damage by 2x for 1 hit, and only lasts for like 1 second (so someone cant leap and just hold onto the charge)
If you can answer those 2 q's i'll subscribe to your newsletter! :P
Peace for now :)
PS/Edit; I sent you a copy of my map via PM as im sure that makes it easier to find out what specifically is missing wrong
The roach detects an enemy in front of it and then, by using a persistant effect to set the target, it performs a jump similar to the one listed above.
Just a suggestion, but for the leap you could try altering Psionic Shockwave ability from Hybrid Maar to see if you can make that do what you want. It applies a force and has effects to alter height, it looks like a jump. It avoids the whole missile thing, not sure about other unintended effects.
Have you considered applying the force effect BEFORE the teleport? The collision buff doesn't do a lot for you given that you're still landing at locations other than where you clicked. You could toss the buff and change the missile impact to a persistent that searches as the initial effect and teleports as the periodic effect (0.1s delay). The result would be that the missile would clear out the area and THEN bring your unit to directly where you clicked.
Anyone try throwing a Point Defense Drone down? Too tired to test right now(had a rough night at work and need some sleep), but uh... place some hostile PDD's and try leaping around?
If your unit teleports before the missile is sent out... haha?? Would look odd. Would basically be a blink without the puff of smoke.
And I guess if you teleport after the missile hits, I guess it would just cancel the teleport midway through... but again... would look odd since you would 'snap back' to your default point.
I use this with the changes ProciacMule suggested and it works, although it looks like sh*t, but that it did before the patch also.
(the unit missile is extremely glitchy)
I'm using this approach and have a problem... Sometimes the missile doesn't hit the target point. It simply disappears and the impact search is never executed. This often happens when you jump into a group of many enemies.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
There area few trigger-based leap abilities around, but I hate doing the math, so I fiddled around and came up with this data-only solution. One caveat:
if the landing zone isn't completely clear, the leaping unit will be teleported to the nearest clear spot - I haven't taken the time to figure out a way around this yet.Updated: Thanks to urashimakt and RileyStarcraft for ideas towards greatly improving this quirk. Landings around buildings are still funky, but other units crowding the landing zone shouldn't cause a problem.The basic idea is that a missile is fired from the casting unit that looks like the unit itself. The casting unit's actor is hidden for the duration of the missile's flight, and then teleported and revealed at the impact point of the missile. I'm just going to stick with the necessary bits, assuming you know how to do things like set up damage and other effects of the leap.
Let's add leap to the zealot using a basic AoE knockback as the impact effect.
Knockback:
Not much to say, pretty standard stuff. (I also tacked a validator on there so that it doesn't make buildings jump - not important for the leap effect itself though)
Leap Clone:
The clone is a basic missile, using the leaping unit's model.
Leap Ability:
The ability itself is a simple projectile launch with a teleport at impact, with some collision suppression to avoid problems with crowding at the landing zone
That last actor isn't really important to the tutorial, but is there if you want to add your own jumping and landing effects
All that's left is to make the real zealot disappear after launching the clone. Go to the existing Zealot Actor, and add two events:
Add the ability and button to your zealot's command card, and voila. Leaping zealot with no triggers.
@WildPickles: Go
Does this account for damage done to the leaping unit, and the Leaping Missile Unit dying mid flight?
These are the main two reasons people have been using Triggers. They can track the damage done to the missile unit and respond to other things.
IMO its better to use the missile leaping effect. but to move the casting unit around with triggers.
@SouLCarveRR: Go
No, but there may be a way to transfer damage from the dummy unit to the caster unit with a behavior. This is a pretty bare-bones example, just for the basics of doing a data-based leap. (I think there are still some issues to work out with a unit already under attack using the ability)
@WildPickles: Go
Yeah I posted because it would be nice to see this taken further to account for those things with pure data.
The caveat is a little unpleasant, but apart from that it looks pretty nice. Maybe there's some validator that could help? (Just throwing in a random thought)
All you have to do is teleport before you launch instead of after.
@RileyStarcraft: Go
That's assuming your target location is clear to begin with. What you can do is make a behavior that suppresses collision and give this to the leaper and all units around the leap location right at the time of teleporting. They'll all be in their correct location and sort out the collision problem when the behavior wears off.
@urashimakt: Go
I tested this, and the teleport effect seems to ignore the collision suppression flag in the behavior and still looks for a clear landing spot. I did however manage to work around it by adding obscene speed bonuses to the behavior, and issuing a move order to the leaper. It's hacky, but it works in most cases, except for the occasional teleport quirk near cliffs, putting the leaper on a different cliff level from the target. I kept the teleport a part of the ability to maintain the ability to jump on/off cliffs, but if cliffs aren't an issue, it could easily be replaced completely with the move order.
@WildPickles: Go
That's strange, I have an ability that swaps the location of two units using that no collision thing and it seems to work for that. Eventually you'll find a full-fledged solution, I'm sure.
Edit: Actually, Riley might've been on to something. What if you teleport the invisible hero first and then send the leaper missile to the location of the hero instead of the target point of the ability? It may not still go exactly where you want it, but at least the missile won't land and spawn the hero somewhere else. You'd have to launch the missile from something else other than the hero and I don't have experience with that, but I imagine it's possible. Launch Location = Source Point instead of Source Unit? Not sure if the Source Point is where the ability was first cast from or if it's always where the caster is at.
I newsed a similar technique few time ago: http://forums.sc2mapster.com/resources/tutorials/10489-data-trigger-missile-based-jumping/
@vjeux: Go
I remember that, and having tested both I'd have to say this one's purtier. That's mostly because of the parabolic mover, but it's cool to see implemented nonetheless. Two things I noted, btw:
1) I made my own parabolic mover and copied the values you listed here into them. It had some strange results occasionally, so I copied the mover from your map exactly and plugged that in, worked much better. Not sure what the difference was, but I don't think it was input error. I checked doubly!
2) The suppress collision DOES work. I was so baffled that it wouldn't that I tried it myself. Make sure that you've applied it to the leaping unit and all units near the target area BEFORE the teleport happens. Other than that I'm not sure what could mess it up!
Again, thanks. This is a really cool and simple non-trigger leap solution.
@vjeux: Go
Wow, don't know how I missed that. I probably just searched for "leap" and not "jump."
@urashimakt: Go
Those are both kind of strange. It's quite possible that I missed out some values for the mover - I wrote this up after the fact, not during the process. I'll try the collision suppression again. I may have only been applying it to the leap unit. Glad you found it useful/interesting, and thanks for the input!
Hey wild
Awesome function, i added it into my map, and the jumping and everything work fine, but... my *missile* is a white orb instead of the model, i dont know where to add that in, i know it should be stupidly easy, but i cant figure it out haha *i am kinda tired atm >.<; and inexperienced... bad combo*
Also, like i said, i am new (this would be my 4th day with using ANY editor ever) how would i add an effect like:
Adds a buff that increases damage by 2x for 1 hit, and only lasts for like 1 second (so someone cant leap and just hold onto the charge)
If you can answer those 2 q's i'll subscribe to your newsletter! :P
Peace for now :)
PS/Edit; I sent you a copy of my map via PM as im sure that makes it easier to find out what specifically is missing wrong
And if you haven't had enough of these jump techniques, I'm implemented a similar one for my Minigame Contest entry a long time ago:
http://forums.sc2mapster.com/resources/project-workplace/5012-contest-minigame/?post=43
The roach detects an enemy in front of it and then, by using a persistant effect to set the target, it performs a jump similar to the one listed above.
@Klishu: Go
Just a suggestion, but for the leap you could try altering Psionic Shockwave ability from Hybrid Maar to see if you can make that do what you want. It applies a force and has effects to alter height, it looks like a jump. It avoids the whole missile thing, not sure about other unintended effects.
Have you considered applying the force effect BEFORE the teleport? The collision buff doesn't do a lot for you given that you're still landing at locations other than where you clicked. You could toss the buff and change the missile impact to a persistent that searches as the initial effect and teleports as the periodic effect (0.1s delay). The result would be that the missile would clear out the area and THEN bring your unit to directly where you clicked.
TL;DR
Ability > Missile (No Set) > Persistent (Initial: Search > Buff > Force) > Periodic Effect: Teleport (0.2s later)
You'd also need to change the actor events to reveal the unit after the teleport effect rather than the search.
@ProzaicMuze: Go
Anyone try throwing a Point Defense Drone down? Too tired to test right now(had a rough night at work and need some sleep), but uh... place some hostile PDD's and try leaping around?
If your unit teleports before the missile is sent out... haha?? Would look odd. Would basically be a blink without the puff of smoke.
And I guess if you teleport after the missile hits, I guess it would just cancel the teleport midway through... but again... would look odd since you would 'snap back' to your default point.
Not to revive a dead topic but this method of jump no longer works in 1.2
@Rhadamant5186: Go
How do you mean? And why woudln't it work?
I use this with the changes ProciacMule suggested and it works, although it looks like sh*t, but that it did before the patch also. (the unit missile is extremely glitchy)
I'm using this approach and have a problem... Sometimes the missile doesn't hit the target point. It simply disappears and the impact search is never executed. This often happens when you jump into a group of many enemies.