I'm trying to create an ability with multiple steps. Basically when you hit the ability button the following will happen:
Button is hit > 4 second cast timer begins, during which your unit begins to smoke > if timer is interrupted (via moving or being attacked, etc) unit returns to normal and cooldown timer begins > if cast is successfull unit becomes red, the smoke becomes red, unit doubles in size and gains increased speed (similar to Proziaicmuze's berserk ability tutorial) > ability lasts 15-20 seconds during which time the unit can run around and any other unit it hits gets knocked back and damaged.
So basically he could run through a giant swarm of zerglings and toss them every which way.
I can set up everything for this ability, but I cannot figure out how to create the knockback part. I can make a knockback, one use type thing but can't figure out how to make it last the 15 seconds and stick with the unit so wherever he goes and whatever he runs into is affected. I'm just not sure which variables need to be edited to make this work. Any help would be appreciated. I've been working off of Prozaic's "data-force-effects tutorial" but this only covers one use things and I'm just not sure what it is I need to be changing.
You'll need to apply a behavior to the unit, put a period on it (1 second for example) that calls an effect periodically. That effect is the search that applies the force/behaviors or whatever you use for the force.
Basically:
Skill > Apply Behavior "Force Buff" to Unit.
"Force Buff" has Effect Periodic "Force Search" each 1 second (or whatever).
Force Search, search an area and calls the "Force Effect".
Yeah but how do I make the "force" last something like 15 seconds. I can make the blast but it basically ends up being a very quick blast that only happens once when I hit the button. I can't make it persist for a period of time. I'm basically trying to be able to push the button once and have my unit run through a group of enemies scattering whoever comes into contact with him. Right now I have to run him to the group then keep hitting the button if I want anyting close. I'm just not sure which numbers need to be changed or if I need seperate behaviors or effects to make it last over a period of time.
Problem is, thats still regarding a one time type of knockback (grenade hits, units get knocked back) I'm trying to figure out how to essentially make:
0 ...... A ...... B
0 = the unit with the ability
Anything that gets into range A from the unit gets knocked back to B
This entire ability lasts for 15 seconds, not a single blast.
The knockback part I got (pretty much, still fine tuning) but I can't make it last for an extended period of time.
Period Count - How many times the Period effect is applied
Period Duration - Time Between Periods
Period Effect - Search Area
Search Area - Search Areas +
+Effect - Your Knockback
Radius - Raidius around your unit
Make sure your Force Effect target location is the casting unit
Now, would you kindly tell me how you get a knockback? When I apply the force, it's just a push, so when I run my unit through, the units are just pushed a little bit, no matter how large I make the force amount.
Now, don't quote me on this cause I'm still learning force effects too but here's what I've learned so far:
Theres a number of variables involved with a blast and changing one or more can make drastic changes, you can make a blast big or small, fast or slow, weak or strong, etc... Some of the key numbers involved are:
In your "Search Area" effect > "Areas +" > Radius & Radius Bonus
In your "Create Persistent" effect > Period Count and Period Durations
In your "Apply Force" effect > Amount and Mass Fraction
Radius - has a smaller effect, basically it's the initial distance form the caster (in a circle) that the initial blast will happen
Radius Bonus - BIG factor here and it took me forever to learn this. Basically it is the distance that each period will expand the blast
Period Count - How many periods will happen
Period Duration - How rapid (or slowly) the periods happen
Amount - How much force is applied
Mass Fraction - not 100% sure what it does but it seems (to me so far with minimal testing) to effect how much of a target units mass it has when it gets hit (a small number like 0.001 makes it "lighter" in relation to the blast, a number like 4 makes it like 4 times as massive (I think, I could be TOTALLY wrong).
Anyway heres some examples of some of my testing. For these tests the radius was 0.5 The amount was 1 and the mass fraction was 1.
When I changed the other 3 here were some results.
Period | Period | Radius |
Count | Durations | Bonus | Results
100 | 0.1 | 0.2 | Slow moving, VERY strong (damage wise) and large blast
10 | 0.1 | 0.2 | Slow moving, VERY strong but significantly smaller area
10 | 0.01 | 0.2 | Fast, weak, small
100 | 0.01 | 0.2 | Fast, weak, large
400 | 0.001 | 0.2 | Almost exaclty the same size and strength as above but faster moving
50 | 0.01 | 0.2 | Fast, weak, medium size
50 | 0.01 | 0.02 | Fast, medium strength, very small size
500 | 0.001 | 0.008 | similar to above
50,000 | 0.001 | 0.008 | MASSIVE SIZE (took em like 3 min to come back), very weak, pretty slow moving
Ugh, that chart looked really nice while I typed it... I'll try to fix it
So you can see how just editing these 3 things can make a difference. From what I noticed too, making the mass fraction small made the enemies seem lighter (so like the weaker blast might not push an ultralisk much, changing the mass fraction makes it move more since it now has less resistance to force (it seemed that way anyway).
But the "radius bonus" plays a huge part in getting more than a teeny-tiny blast. Give it the correct setting and suddenly things get moving (get it?)
The problem I'm experiencing right now is the ability I want is becommming all janky. To get the ability to last the 15 seconds I want I had to A. make enough periods to make it last 15 seconds which slows the entire program down A LOT, plus makes a bigger blast than I desire or B. create a second create persistent which also governs the first one. But then I get problems with too much damage. I'd really like to just have a very small (but powerful) blast happens whenever an enemy makes contact with my unit and I feel like I'm missing something to get it to work properly.
Ok, I'm checking the radius bonus now. The your getting a lot of damage b/c the damage effect is applied each period. Lower your damage to like .1 to compensate for this.
Oh definatly. I figured the damage thing before your reply (thanks anyway). But the problem was that it "looks" wrong. The efect I'm trying to get simply looks, weird. I'm not sure how else to put it but if this is the only way I can do it then it simply won't work because it looks terrible. I'm thinking, after finding a tutorial about "auras" (http://forums.sc2mapster.com/resources/tutorials/9277-applying-an-aura-to-a-unit-easy-difficulty/#p12) that I might try this instead. Creating an "aura" of knockback around the unit instead of a persistent knockback. Not sure if it'll be any different but it's worth a try I suppose.
Tell me if you found a way to have a good working and looking knockback.
I also tried force effects. But I don't want the force effect to push my unit around other units, objects or unpathable terrain. That just looks stupid.
But my attempts to code a knockback failed more or less. But as long as I have ideas how I could do it, I will keep on trying :D
Am I even right asuming that you want a straight-line knockback, with a fixed duration or speed which stops when hitting objects? If not, then it's probably easier to do this by using a buff which periodically pushs the unit back for some seconds.
What I basically want is an "on contact" knockback that lasts for a specified duration. When my unit runs into the enemy unit it gets flung away.
Picture about 20 zerglings in a tight pack with my unit to one side of them, my unit runs a direct line through them and ends up on the other side. Those that were in his path got knocked back as they made contact. Thats my ideal. Without it looking totally weird and fake.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'm trying to create an ability with multiple steps. Basically when you hit the ability button the following will happen:
Button is hit > 4 second cast timer begins, during which your unit begins to smoke > if timer is interrupted (via moving or being attacked, etc) unit returns to normal and cooldown timer begins > if cast is successfull unit becomes red, the smoke becomes red, unit doubles in size and gains increased speed (similar to Proziaicmuze's berserk ability tutorial) > ability lasts 15-20 seconds during which time the unit can run around and any other unit it hits gets knocked back and damaged.
So basically he could run through a giant swarm of zerglings and toss them every which way.
I can set up everything for this ability, but I cannot figure out how to create the knockback part. I can make a knockback, one use type thing but can't figure out how to make it last the 15 seconds and stick with the unit so wherever he goes and whatever he runs into is affected. I'm just not sure which variables need to be edited to make this work. Any help would be appreciated. I've been working off of Prozaic's "data-force-effects tutorial" but this only covers one use things and I'm just not sure what it is I need to be changing.
You'll need to apply a behavior to the unit, put a period on it (1 second for example) that calls an effect periodically. That effect is the search that applies the force/behaviors or whatever you use for the force.
Basically:
Skill > Apply Behavior "Force Buff" to Unit.
"Force Buff" has Effect Periodic "Force Search" each 1 second (or whatever).
Force Search, search an area and calls the "Force Effect".
@fr0d0b0ls0n: Go
Yeah but how do I make the "force" last something like 15 seconds. I can make the blast but it basically ends up being a very quick blast that only happens once when I hit the button. I can't make it persist for a period of time. I'm basically trying to be able to push the button once and have my unit run through a group of enemies scattering whoever comes into contact with him. Right now I have to run him to the group then keep hitting the button if I want anyting close. I'm just not sure which numbers need to be changed or if I need seperate behaviors or effects to make it last over a period of time.
@Auracy: Go
Maybe this can help you:
http://forums.sc2mapster.com/development/data/10852-apply-force-knocking-the-hit-unit-on-impact/
@D1000: Go
Problem is, thats still regarding a one time type of knockback (grenade hits, units get knocked back) I'm trying to figure out how to essentially make:
0 ...... A ...... B
0 = the unit with the ability
Anything that gets into range A from the unit gets knocked back to B
This entire ability lasts for 15 seconds, not a single blast.
The knockback part I got (pretty much, still fine tuning) but I can't make it last for an extended period of time.
Create Persistent
Period Count - How many times the Period effect is applied
Period Duration - Time Between Periods
Period Effect - Search Area
Search Area - Search Areas +
+Effect - Your Knockback
Radius - Raidius around your unit
Make sure your Force Effect target location is the casting unit
Now, would you kindly tell me how you get a knockback? When I apply the force, it's just a push, so when I run my unit through, the units are just pushed a little bit, no matter how large I make the force amount.
Now, don't quote me on this cause I'm still learning force effects too but here's what I've learned so far:
Theres a number of variables involved with a blast and changing one or more can make drastic changes, you can make a blast big or small, fast or slow, weak or strong, etc... Some of the key numbers involved are:
In your "Search Area" effect > "Areas +" > Radius & Radius Bonus
In your "Create Persistent" effect > Period Count and Period Durations
In your "Apply Force" effect > Amount and Mass Fraction
Radius - has a smaller effect, basically it's the initial distance form the caster (in a circle) that the initial blast will happen
Radius Bonus - BIG factor here and it took me forever to learn this. Basically it is the distance that each period will expand the blast
Period Count - How many periods will happen
Period Duration - How rapid (or slowly) the periods happen
Amount - How much force is applied
Mass Fraction - not 100% sure what it does but it seems (to me so far with minimal testing) to effect how much of a target units mass it has when it gets hit (a small number like 0.001 makes it "lighter" in relation to the blast, a number like 4 makes it like 4 times as massive (I think, I could be TOTALLY wrong).
Anyway heres some examples of some of my testing. For these tests the radius was 0.5 The amount was 1 and the mass fraction was 1.
When I changed the other 3 here were some results.
Period | Period | Radius |
Count | Durations | Bonus | Results
100 | 0.1 | 0.2 | Slow moving, VERY strong (damage wise) and large blast
10 | 0.1 | 0.2 | Slow moving, VERY strong but significantly smaller area
10 | 0.01 | 0.2 | Fast, weak, small
100 | 0.01 | 0.2 | Fast, weak, large
400 | 0.001 | 0.2 | Almost exaclty the same size and strength as above but faster moving
50 | 0.01 | 0.2 | Fast, weak, medium size
50 | 0.01 | 0.02 | Fast, medium strength, very small size
500 | 0.001 | 0.008 | similar to above
50,000 | 0.001 | 0.008 | MASSIVE SIZE (took em like 3 min to come back), very weak, pretty slow moving
Ugh, that chart looked really nice while I typed it... I'll try to fix it
So you can see how just editing these 3 things can make a difference. From what I noticed too, making the mass fraction small made the enemies seem lighter (so like the weaker blast might not push an ultralisk much, changing the mass fraction makes it move more since it now has less resistance to force (it seemed that way anyway).
But the "radius bonus" plays a huge part in getting more than a teeny-tiny blast. Give it the correct setting and suddenly things get moving (get it?)
The problem I'm experiencing right now is the ability I want is becommming all janky. To get the ability to last the 15 seconds I want I had to A. make enough periods to make it last 15 seconds which slows the entire program down A LOT, plus makes a bigger blast than I desire or B. create a second create persistent which also governs the first one. But then I get problems with too much damage. I'd really like to just have a very small (but powerful) blast happens whenever an enemy makes contact with my unit and I feel like I'm missing something to get it to work properly.
Ok, I'm checking the radius bonus now. The your getting a lot of damage b/c the damage effect is applied each period. Lower your damage to like .1 to compensate for this.
@Vortexx2010: Go
Oh definatly. I figured the damage thing before your reply (thanks anyway). But the problem was that it "looks" wrong. The efect I'm trying to get simply looks, weird. I'm not sure how else to put it but if this is the only way I can do it then it simply won't work because it looks terrible. I'm thinking, after finding a tutorial about "auras" (http://forums.sc2mapster.com/resources/tutorials/9277-applying-an-aura-to-a-unit-easy-difficulty/#p12) that I might try this instead. Creating an "aura" of knockback around the unit instead of a persistent knockback. Not sure if it'll be any different but it's worth a try I suppose.
Tell me if you found a way to have a good working and looking knockback.
I also tried force effects. But I don't want the force effect to push my unit around other units, objects or unpathable terrain. That just looks stupid.
But my attempts to code a knockback failed more or less. But as long as I have ideas how I could do it, I will keep on trying :D
Am I even right asuming that you want a straight-line knockback, with a fixed duration or speed which stops when hitting objects? If not, then it's probably easier to do this by using a buff which periodically pushs the unit back for some seconds.
@Rushhour: Go
What I basically want is an "on contact" knockback that lasts for a specified duration. When my unit runs into the enemy unit it gets flung away.
Picture about 20 zerglings in a tight pack with my unit to one side of them, my unit runs a direct line through them and ends up on the other side. Those that were in his path got knocked back as they made contact. Thats my ideal. Without it looking totally weird and fake.