Creating a Ability

robinremue

Member
Reaction score
16
I want to create this ability.
A unit casts the ability, then a beam comes shooting toward the targeted unit, I did it until this part. Then I want flame strikes to show up like this:

Caster-Flamestrike-Flamestrike-Flamestrike-Flamestrike-Flamestrike-Target

If you get what I mean, could someone help me plz :D
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Set CasterPoint = position of casting unit
Set TargetPoint = position of target unit of ability being cast
Set Angle = angle between CasterPoint and TargetPoint
Set Offset = (distance between CasterPoint and TargetPoint) / 6
Set Distance = Offset

For each Integer A from 1 to 5 do
- Special effect - create effect at CasterPoint offset by Distance with angle Angle (point with polar offset) using model "FlameStrike"
- Special effect - destroy (last created special effect)
- Set Distance = Distance + Offset


However, that might look somewhat strange if the units are too close, or really far.
 

robinremue

Member
Reaction score
16
Thanks, so I would better give the ability a minimun range??
What kind of variables are Angle, Offset and Distance??
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> so I would better give the ability a minimun range?

Depends on how complicated you want this.
But, if they are really close, like at melee range, creating 5 flame strikes in between their feet...

You could try to do:
If distance less than 200 then create only 1
or, distance between 200 and 400 then create 3

Or, starting at the caster's position, you create one every 50 until you reach the target...
That one would be very dynamic, the closer you are, the less are created.

> What kind of variables are Angle, Offset and Distance?

Real. All three.
 

robinremue

Member
Reaction score
16
Great thanks very much
But how do you add the /6 on the distance between target and casterpoint??

I now have this

Code:
AnimationAbility
    Events
        Unit - A unit owned by Player 1 (Red) Begins casting an ability
    Conditions
        (Ability being cast) Equal to Final Flash 
    Actions
        Set CasterPoint = (Position of (Casting unit))
        Set TargetPoint = (Position of (Target unit of ability being cast))
        Set Angle = (Angle from CasterPoint to TargetPoint)
        Set Offset = (Distance between CasterPoint and TargetPoint)
        Set Distance = Offset
        For each (Integer A) from 1 to 5, do (Actions)
            Loop - Actions
                Special Effect - Create a special effect at (CasterPoint offset by Distance towards Angle degrees) using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
                Wait 2.00 game-time seconds
                Special Effect - Destroy (Last created special effect)
                Set Distance = (Distance + Offset)
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Arithmetic.
(Change the "value" to "distance between ...", the "+" to "/" and the "1" to "6")


EDIT:
> Wait 2.00 game-time seconds
> Special Effect - Destroy (Last created special effect)

should be

> Special Effect - Destroy (Last created special effect)
> Wait 2.00 game-time seconds

Do you need the "wait"? Try without...
 

robinremue

Member
Reaction score
16
Code:
Final Flash
    Events
        Unit - A unit owned by Player 1 (Red) Begins channeling an ability
    Conditions
        (Ability being cast) Equal to Final Flash 
    Actions
        Set CasterPoint = (Position of (Casting unit))
        Set TargetPoint = (Position of (Target unit of ability being cast))
        Set Angle = (Angle from CasterPoint to TargetPoint)
        Set Offset = ((Distance between CasterPoint and TargetPoint) / 6.00)
        Set Distance = Offset
        For each (Integer A) from 1 to 5, do (Actions)
            Loop - Actions
                Special Effect - Create a special effect at (CasterPoint offset by Distance towards Angle degrees) using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
                Wait 1.00 seconds
                Special Effect - Destroy (Last created special effect)
                Set Distance = (Distance + Offset)

Yes It doesn't work without the wait time :confused:
But when I test the ability, the flamestrikes are created at the feet of the casting hero :confused:
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Well, you have:
Set Offset = ((Distance + Offset) / 6.00)

My post said:
Set Offset = (distance between CasterPoint and TargetPoint) / 6
 

robinremue

Member
Reaction score
16
I changed that,

--> I target a unit then a flamestrike comes after some seconds a second comes really close to the old one and he does that 3 times, It looks really weird :confused:

You wrote, set angle: ... between...
I got set angle: ... from ....???
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Hm...

If you add a couple "Game - Display to (all players)", showing
- the name of the "target unit of ability being cast"
- the "offset", after you set it
- the "distance", inside the loop

Does it make sense? Is the Offset shorter if you're closer?


Also, you're using "channels an ability" as event.
You could try "starts the effect".


As for the "from" and "between", well, I'm typing this from (weak) memory.
No editor in front of me... ;)
 

robinremue

Member
Reaction score
16
IT WORKS, I just needed to change the event lol :D

But its pretty slow, I mean, the enemy is dead before the flames reach him :)
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> But its pretty slow, I mean, the enemy is dead before the flames reach him

:D

Don't "wait" so long. Don't kill so fast...


That said, if you feel like it:

Code:
FlameStrikeToTarget
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to <some ability that targets a unit>
    Actions
        Set tmpReal = 96.00
        Set CasterPoint = (Position of (Casting unit))
        Set TargetPoint = (Position of (Target unit of ability being cast))
        Set Angle = (Angle from CasterPoint to TargetPoint)
        Set tmpInteger = (Integer(((Distance between CasterPoint and TargetPoint) / tmpReal)))
        Set Distance = 0.00
        For each (Integer A) from 1 to tmpInteger, do (Actions)
            Loop - Actions
                Set Distance = (Distance + tmpReal)
                Special Effect - Create a special effect at (CasterPoint offset by Distance towards Angle degrees) using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
                Set FlameEffects[(Integer A)] = (Last created special effect)
                Wait 0.10 game-time seconds
        Wait 2.00 game-time seconds
        For each (Integer A) from 1 to tmpInteger, do (Actions)
            Loop - Actions
                Special Effect - Destroy FlameEffects[(Integer A)]

(That's with editor...)

That would be the "dynamic" version mentioned earlier.
To have more or less flames, all you need to change is the "96" for "tmpReal" (bigger = less).
"FlameEffects" is an array of "special effects", size... at least 20.


Happy mapping,
AceHart
 

robinremue

Member
Reaction score
16
hehe, I'll implement when I have some time, need to do homework now :mad:

But really really thanks

?? tmpReal = real variable??
?? tmpInteger= Integer Variable??
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> need to do homework

Excellent.


> tmpReal = real variable?
> tmpInteger= Integer Variable?

And there I thought the names would be clear... ah, well...
So, hm, yes.
 

robinremue

Member
Reaction score
16
Homework can wait a bit :)

Can't find this line

Code:
set tmpInteger = (Integer(((Distance between CasterPoint and TargetPoint) / tmpReal)))

I setted tmpInteger as an integer variable

So for the moment I have this

Code:
Final Flash Animation
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Final Flash attack,slam
    Actions
        Set tmpReal = 96.00
        Set Casterpoint = (Position of (Casting unit))
        Set Targetpoint = (Position of (Target unit of ability being cast))
        Set Angle = (Angle from Casterpoint to Targetpoint)
     [U][B] Set tmpInteger = 0[/B][/U]
        Set Distance = 0.00
        For each (Integer A) from 1 to tmpInteger, do (Actions)
            Loop - Actions
                Set Distance = (Distance + tmpReal)
                Special Effect - Create a special effect at (Casterpoint offset by Distance towards Angle degrees) using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
                Set FlameEffects[(Integer A)] = (Last created special effect)
                Wait 0.10 game-time seconds
        Wait 2.00 game-time seconds
        For each (Integer A) from 1 to tmpInteger, do (Actions)
            Loop - Actions
                Special Effect - Destroy FlameEffects[(Integer A)]
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Since both "Distance between CasterPoint and TargetPoint" and "tmpReal" are of type "real",
the result is also "real".
But, we need an Integer.

So, a quick, or so, look in the functions list... "Conversion - convert Real to Integer".
Then some arithmetic, done.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top