spell help nova ? type of spell

Status
Not open for further replies.

311

311

Level 4
Joined
May 12, 2019
Messages
73
I am trying to make a spell that looks similar to warstomp for the effect but just does damage(no stun), I don't want it to stop movement and I want the effect to be delayed and the effect to be modified by how many times it can happen.

example

1. You cast the spell (doesn't stop movement so you can cast without interrupting walking)
2. No damage or effect happens for 3 seconds at all (only the mana cost and cooldown start)
3. Then after 3 seconds centered on the caster the warstomp animation plays 3x in row damaging each time

I want the animation(the warstomp) be able to be modified so you can change how many times it plays out, as its a hero skill that will have levels. So once you level it up it could possibly do 5x warstomps

If anybody has played Diablo3, I am trying to make explosive blast from Wizard (warstomp animation is closest I find for looks)

Bonus if it does add a debuff to unit though in case I do decide that it could possibly slow
 
Level 3
Joined
Mar 10, 2018
Messages
32
Use Berserk as a base ability, it doesn’t interrupt walking animation, just set all the parameters to 0 to make it blank.

Trigger actions would look like this.

Set HERO = Triggering Unit
Wait 3 seconds

For each integer A from 1 to 3:
Group - Pick every unit in range 500 of HERO and do Action (Unit - Make HERO deal 100 damage to Picked Unit)
Wait 1 sec
(Loop ends here)

UPD: change the number 3 in ‘For each integer A from 1 to 3’ to X, where X is:

Set X = Hero Ability Level (Warstomp)

so the damage will be dealt as many times as the ability was leveled up.
 
Last edited:
Level 9
Joined
Jul 30, 2018
Messages
445
The suggested ability above wouldn't be MUI, meaning that if two heroes cast the spell then only one would actually be doing it. I would do it with hashtables, as once you get the hang of them, they are very easy to use.

Here, I made an example map with an ability that causes unit to damage nearby enemies several times after a delay. I tried to put some comments on, but feel free to ask if you need something explained.
 

Attachments

  • ExplodeAbilityWithHashtables.w3x
    20.9 KB · Views: 13
Last edited:

311

311

Level 4
Joined
May 12, 2019
Messages
73
The suggested ability above wouldn't be MUI, meaning that if two heroes cast the spell then only one would actually be doing it. I would do it with hashtables, as once you get the hang of them, they are very easy to use.

Here, I made an example map with an ability that causes unit to damage nearby enemies several times after a delay. I tried to put some comments on, but feel free to ask if you need something explained.

You are my hero, this is amazing, turned out exactly how I asked, even the timing of the additional explosions is good since they are slightly spread out, just like Diablo 3 :)
Thanks for the all the little notes in the trigger also, pretty sure I understand it all as you did an amazing job triggering, but also explaining.

Actually if there is one thing that can possibly changed? May not be possible
Similar to Diablo 3, if I cast it 2x I want it to start the counting again and go off(not cancelling the 1st), so if I was somehow able to cast it 2x in 1sec, then basically in 3 seconds 6 explosions are going to go off.
If its not possible or really difficult I can leave it as it is, but I wanted to have an item in the game where the cooldown can be reset/lowered so there would be some occasions where you would be firing off the skill more then normal
 
Last edited:
Level 9
Joined
Jul 30, 2018
Messages
445
You're welcome! Happy to help. :)

If you want to make it castable multiple times in a row, it's actually pretty easy. You just have to first load the current value and then add the new value to that instead of overriding the original value. If you just set the value without checking what the current value is, it overrides it. So in the cast trigger do this:

  • Set CurrentExplosions = (Load (Key explosions) of (Key (Triggering unit)) from BerserkTable)
  • Hashtable - Save (2 + ((Level of Berserk for (Triggering unit)) + CurrentExplosions)) as (Key explosions) of (Key (Triggering unit)) in BerserkTable
----

Now the delay, if you did not want it to start from zero every time, here is what I came up with:

The kind of same applies to the delay, as in it will reset that value back to 3 with each cast. Now the difference here is that if the value is 0, it means that the explosions have begun, but it could also mean that there's just no information stored, as in the value is actually null, but they both translate to 0.

What I came up with was another variable to check if the ability is being cast currently. If it is, then don't reset the delay, and if it's not, only then reset the value to 3 (or whatever you want the delay to be).

  • Set CurrentlyActive = (Load (Key active) of (Key (Triggering unit)) from BerserkTable)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • CurrentlyActive Equal to 0
    • Then - Actions
      • Hashtable - Save 3.00 as (Key delay) of (Key (Triggering unit)) in BerserkTable
      • Hashtable - Save 1 as (Key active) of (Key (Triggering unit)) in BerserkTable
    • Else - Actions
The CurentlyActive is just a integer variable. If it's zero, there is no such information stored (therefore it's actually null). And if it's larger than zero, it means the ability has been cast at least once.

You don't need to set it back to 0, because it will return 0 anyway after you destroy all the information of the unit from the hashtable at the end of the periodic trigger.

Alternatively, you could use this to something else too: instead of - again - just resetting the Active value, you could, for example, add 1 to it, this way you could keep track of how many times the ability has been cast in a row. This can be used for anything: make it deal damage more with each cast, or make it cost mana with each cast, or whatever. Just Load (Key active) for the amount of casts in a row.

But this all is pretty fancy, if you just want to increase the number of explosions and you don't mind the delay starting again from zero, then you only need the first part.
 
Last edited:

311

311

Level 4
Joined
May 12, 2019
Messages
73
hmm I am not sure why but it doesn't seem to always work but I am not sure what causes it not to not work only sometimes.
One thing though, and its ok if not, as you have done so much already I feel bad asking to update/change but lets say you cast it 1x then .5 seconds later you cast it again. The way it currently is it does blast...blast...blast...blast...blast...blast(all at 1second intervals) but Id want it to be similar to Diablo 3 where it would be blast.blast.blast.blast.blast.blast. Not sure if that makes sense lol, but basically if you were to cast the 2nd cast .5 seconds after the 1st, that would mean instead of being 1sec per blast it would be .5 secs in between blast because the 1st ability is going off at the 4sec 5sec 6sec mark, but the 2nd cast should be gonig off at the 4.5sec 5.5 and 6.5 second mark.
 

311

311

Level 4
Joined
May 12, 2019
Messages
73
The interval time can be changed and I did understand that part because of how well you documented :)
But I mean its always 1 1second, when it should be shorter technically if I were to cast it right away.
Example
Lets say at 10seconds into game time I press the ability then I press the ability again at 10.5 seconds of game time
the way it currently works with the spell at 13seconds it will do an explosion then 14 15 16 17 and 18 seconds it would do an explosion
------------------------------------------------------------------------------------------------------------------------------------------


however because the 2nd click of the ability came at 10.5 seconds it technically SHOULD (or I want it to because similar to Diablo 3)

At 13seconds explode at 13.5 seconds explode at 14second explode 14.5 seconds explode 15 seconds explode and 15.5 seconds explode then end.
This would be because the 1 sec explosion intervals from the 1st click of my cast at the 10second mark are exploding at 13 14 15(Working properly), while my quick cast of the ability shortly after at 10.5 second mark should be causing the explosions at 13.5 14.5 15.5 seconds but they aren't basically the 2nd cast is getting delayed till the 1st is completed, but I don't want it to be
 
Level 9
Joined
Jul 30, 2018
Messages
445
Oh, I see. Well, it can be a bit tricky, because the the trigger doesn't actually start all over again every time you cast the ability. I guess the closest you could do is always divide the interval with the amount of casts. So put:

  • Set ExplosiveBlast_Casts = (Load (Key casts) of (Key TempHandle) from ExplosiveBlastTable)
To the start of the Periodic trigger at the same point where the other variables are set.

Then change the part where the interval is added from Interval to Interval / Casts:

  • Hashtable - Save (ExplosiveBlast_BlastInterval / (Real(ExplosiveBlast_Casts))) as (Key delay) of (Key TempHandle) in ExplosiveBlastTable
This way the interval will be 0.5 after two casts, 0.33 after three casts, 0.25 after four casts and so on.
 
Last edited:

311

311

Level 4
Joined
May 12, 2019
Messages
73
So I put
Hashtable - Save (ExplosiveBlast_BlastInterval / (Real(ExplosiveBlast_Casts))) as (Key delay) of (Key TempHandle) in ExplosiveBlastTable
to replace what was there
this was in the explosive blast periodic trigger and the 2nd action


the 1st part you list
Set ExplosiveBlast_Casts = (Load (Key casts) of (Key TempHandle) from ExplosiveBlastTable)
This was already there and I changed nothing at all.....
In the explosive blast cast trigger? 3rd action correct?

Because then making this change, when I cast it 2x, it works close enough to what I am asking, but 1 cast will do nothing at all now :(
 
Status
Not open for further replies.
Top