• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Stunning triggering unit after 6s

Status
Not open for further replies.
Level 3
Joined
Mar 1, 2015
Messages
53
How can I make my triggering unit(casting spell A) get stunned after 6 seconds after not casting spell A?
Something like Alchemists unstable concoction in dota.

I tried adding the timer spell(B) after unit cast spell A.
And make trigger whenever hero learns a spell B, -wait 6 seconds, dummy cast stun on triggering unit.
hero casts spell A= remove spell B from triggering unit.
Didn't work... is this method even possible or I am going in completly wrong way?
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
I am not familiar with dota so you have to explain what actually happens.
Anyway I can do whatever the purpose is. Just need to know what it is.

Tell me exacly what has to happen.
From this I can only think of:
When a unit cast spell A, he will gain a debuff for 6 seconds.
When he cast spell A again, that debuff will be reset to 6 seconds.
When the debuff ends, the unit is stunned.
 
Level 3
Joined
Mar 1, 2015
Messages
53
When unit cast spell A, he gets random ability(random integer from 1-3 lets call it B).
When unit casts spell A he will get- lets call it debuff which stuns triggering unit after 6 seconds.
Hovewer player can disable this debuff by using any of B spells.

Check:https://www.youtube.com/watch?v=vsXekvLGIEk
Spell starts at: 0;34
I want to use only: 1;06

My spell doesn't need the timer thing
 
Level 6
Joined
Oct 31, 2014
Messages
170
Don't wait 6 seconds after creating a dummy, just add a 6 seconds casting time on the spell you use to stun. ( custom mountainking bolt perhaps) ?

so just create the dummy, add 8 second expiration timer on last created unit, add custom bolt on last created unit, order last created unit to "montainking bolt" triggering unit.

and if you want a reset, just save the handle of your dummy somewhere or add it to a dummygroup and remove it from the game every time your cast your spell A.

  • efzg
    • Evénements
      • Unité - A unit start the effect of an ability
    • Conditions
      • (Ability being cast) Egal to SPELL A
    • Actions
      • Unité - Remove (Load 1 of 1 in (Last created hashtable)) from the game
      • Unité - Create 1 dummy for Joueur 1 (Rouge) at (Position of (Triggering unit)) facing Orientation bâtiment par défaut degrees
      • Unité - Add a 8.00 second Générique expiration timer to (Last created unit)
      • Table de hachage - Save Handle Of(Last created unit) as 1 of 1 in (Last created hashtable)
      • Unité - Add custom bolt to (Last created unit)
      • Unité - Order (Last created unit) to human mountain king - lighting bolt (Triggering unit)

and dont forget to create a hashtable at the map init ^^
 
Level 13
Joined
Dec 21, 2010
Messages
541
How can I make my triggering unit(casting spell A) get stunned after 6 seconds after not casting spell A?
Something like Alchemists unstable concoction in dota.

I tried adding the timer spell(B) after unit cast spell A.
And make trigger whenever hero learns a spell B, -wait 6 seconds, dummy cast stun on triggering unit.
hero casts spell A= remove spell B from triggering unit.
Didn't work... is this method even possible or I am going in completly wrong way?

You need two ability here..the first ability is where you activate the Main ability then disable the 1st ability when you cast it and add the 2nd ability which can target a unit...then start the timer which is 6 seconds.. create a boolean so if the caster did not use the 2nd ability he will get stunned.. create a trigger that check if the caster casts the 2nd ability, if so, enable again the 1st ability then remove the 2nd ability..
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
I would make this spell with my Effect Over Time (EOT) System and my Multi Cast Ability (MCA) System.
The MCA System will allow you to add a second spell to a unit with a dynamic amount of time that you are able to cast the second (third, fourth, etc) spell.

Also make a debuff using my EOT System that can be hidden or whatever you like and when it expires, you stun the target (of the EOT, which is the caster).
When you cast spell B, you will remove the EOT so it will be dispelled and not expired. You also can get the remaining (or total - remaining) time to calculate the duration of the stun on the targeted unit.

The best thing to make the missile of the spell is using a missile system like mine that can save additional data to a missile (in this case the stun duration) and stun the unit on the exact moment of collision.
But that will be done later.
 
Level 3
Joined
Mar 1, 2015
Messages
53
I tried doing it my method:

spell A:
  • Drink
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Inhale Fluids
    • Actions
      • Unit - Pause (Triggering unit)
      • Sound - Play Slurp_SoundBible_com_2051284741 <gen> at 65.00% volume, attached to (Triggering unit)
      • Wait 1.50 seconds
      • Unit - Unpause (Triggering unit)
      • Unit - Order (Triggering unit) to Stop
      • Unit - Create 1 Dummy_hero for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to drink_boom
      • Unit - Add drink_stun to (Last created unit)
      • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Triggering unit)
      • Set random = (Random integer number between 1 and 4)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • random Equal to 3
        • Then - Actions
          • Unit - Remove Base Skills Brewmaster drink3 from (Triggering unit)
          • Unit - Remove Base Skills Brewmaster drink from (Triggering unit)
          • Unit - Remove Greater Throw Barrel from (Triggering unit)
          • Unit - Add SPIT IT OUT red to (Triggering unit)
          • Skip remaining actions
        • Else - Actions
  • [...]
Spell B:
  • fbIred
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to SPIT IT OUT red
    • Actions
      • Wait 1.00 seconds
      • Unit - Remove SPIT IT OUT red from (Triggering unit)
      • Unit - Remove drink_boom from (Triggering unit)
      • Unit - Add Base Skills Brewmaster drink3 to (Triggering unit)
      • Unit - Add Greater Throw Barrel to (Triggering unit)
      • Unit Group - Pick every unit in drink_boom and do (Actions)
        • Loop - Actions
          • Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
Works correctly, but here's the questions:
1. Is it MUI?
2. Sometimes my hero gets stunned permamently, might that be because of paused unit getting stunned?
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
About your triggers, dont use "Wait (seconds)"
In this case, you can't even use "Wait (seconds) of gametime" because you need perfect accuracy because this will be about really good timing.
Put units, players, etc in variables if you will use them multiple times.
In the last one, you remove "Last created unit" instead of "Picked unit" which will not work.

Removing abilities from a unit is also very bad. Disable them for the player instead.
This will make it MPI but is the only way to have a cooldown if you want to use Blizzard cooldowns.
One question: Is that random because you only want a 33.33% chance that you can cast the second spell?

If you want the timer to pop up then you need a buff model with the time as animation.
Next to that, just do what I posted and you will be surprised about the results.
The point of using these systems is that everything is already done for you.
You only have to say which abilities you have and which effects have to be activated but everything like MUI things, custom data, accurate timers, etc is already done by the systems.

Just check it out.
(Links in my signature.)
 
Level 3
Joined
Mar 1, 2015
Messages
53
Ok I replaced last created unit to picked unit.
Yes its random beacuse I want chance to get other spell. (I just didn't include the rest of the code, thought its irrelevant)
This spell is supposed to have no cd anyway so I will let it stay the same.

new questions:

1.Replacing waits with call TriggerSleepAction(x) can do the trick?
2.How can I replace pausing unit? I want my hero to stay still unable to do anything for 1.5 seconds.
3.If I want the stun to remove spell B and add spell A, should I make new trigger:
unit starts the effects of a spell
spell equal to stunn
actions: remove spell B, add spell A
 
Level 13
Joined
Dec 21, 2010
Messages
541
1. You really need to make timers and learn how to use Time - every seconds of game time.
2. Pausing unit is enough.. it's just the wait timer makes your trigger wrong.
3. yes..but using remove spell will make the spell completely removed including the cooldown.. so I suggest that add Spell B then just use enable/disable ability..
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Ok now I lost my patience.
Just hang on for a while and I will upload it.

EDIT:
Here it is:
You might want to change icons, tooltips, attachment and stuff.
This took me actually 20 minutes to make -_-
 

Attachments

  • Unstable Concoction.w3x
    53.7 KB · Views: 89
Level 1
Joined
Mar 25, 2015
Messages
2
A multiple trigger will work, for example..
two triggers are involved TRIGGER A, B and C.
A and B are initialy on, while C are not.
Trigger A says he is responsible for writing variable and turning on Trigger C. trigger B will be responsible for checking if the unit has already using the ability or not, and will again turn off the trigger C if true.
Trigger C will be responsible for waiting how much second is wasted enough to inflict damage on the unit who doesnt use the ability yet.

Now with those 3 triggers working together, the ability may work!! :thumbs_up:

USING JASS WILL BE WAY BETTER... "even i dont know how to use jass" :vw_death:
 
Level 3
Joined
May 12, 2012
Messages
41
How can I make my triggering unit(casting spell A) get stunned after 6 seconds after not casting spell A?

with a buff & a dummy.

unit - starts effect A
___
ability being cast = A = true
___

set variable 1 = triggering unit

create dummy_A for owner of var1

set var2 = last created unit

order var2 to buff (probably rejuvenate w/o heal or parasite w/o dmg, just a 6-second-lasting marker) var1

wait 6 seconds

if/then/else:
_if:
var1 has (boolean) specific buff = true
__then:
do nothing
__else do:
order var2 to human - M.King - stormstrike var1


make sure you use unique variable names or you might cause crashes.
maybe you could also use those orders above with a loopfunction to have it's buff-conditions checked every second.

just one thing idk about your request: when do you want the 6s timer to start? i expected after the first time the hero used spell A, but i'm not sure
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Unless you use a timer... this will not work.
Also, you cannot simply use rejuvenation, heal (which one?), parasite, bloodlust, etc for the buff because 2 different abilities based on the same parent ability will crash the buff when they collide (removing both buffs)

Also, your buff is dispellable... means that the mechanic it is used for is broken as well.
 
Level 3
Joined
May 12, 2012
Messages
41
Unless you use a timer... this will not work.
Also, you cannot simply use rejuvenation, heal (which one?), parasite, bloodlust, etc for the buff because 2 different abilities based on the same parent ability will crash the buff when they collide (removing both buffs)

Also, your buff is dispellable... means that the mechanic it is used for is broken as well.

i don't see why you would use 2 abs based off of the same, makes zero sense because of exactly what you said.

and with bloodlust you are right, but if the buff is a desease cloud or a heal like rejuvenation, it won't be dispelled, as you can read in blizzard's very own "spell basics" thread: http://classic.battle.net/war3/basics/spellbasics.shtml

he could even use a several-seconds-lasting holy light! ;)

*edit:
i just had a new idea, about the disease cloud. give the dummy a non-dmg desease cloud, aiming only allies/heros(/player units) and let the dummy cast stormstrike if there's no renamed disease-debuff upon the hero. would also work.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
i don't see why you would use 2 abs based off of the same, makes zero sense because of exactly what you said.
Ok... consider this. I want more than 20 custom buffs in my map.
Reasonable? ... Impossible.
There are not enough base abilities that do it for you. Next to the fact that the base ability will also not work any more. So whatever you want, you already are at the limit.

and with bloodlust you are right, but if the buff is a desease cloud or a heal like rejuvenation, it won't be dispelled, as you can read in blizzard's very own "spell basics" thread: http://classic.battle.net/war3/basics/spellbasics.shtml
True, but then you still have the problem that you can only have 1 buff that is undispellable.

he could even use a several-seconds-lasting holy light! ;)
0.o my holy light doesn't

*edit:
i just had a new idea, about the disease cloud. give the dummy a non-dmg desease cloud, aiming only allies/heros(/player units) and let the dummy cast stormstrike if there's no renamed disease-debuff upon the hero. would also work.
Hmm... yes I suppose it does. But then you still have to handle the timers yourself and you still have to handle the dummy.
When using timers properly (MUI compatible) you have to use JASS as well.
If you download the map that I uploaded a few posts back, you can see that the configuration is as simple as possible. The complete effect of the spell is made in those "Set variable" actions. Everything else is handled by the system.
Sounds like easy huh?
 
Level 3
Joined
May 12, 2012
Messages
41
Sounds like easy huh?

actually does, but since the thread opener didn't even try it in JASS, i imagine he can't handle it :p

why would you have only 1 undispellable buff...? you could simply use different spell amplifiers, or not...?

Ok... consider this. I want more than 20 custom buffs in my map.
Reasonable? ... Impossible.
There are not enough base abilities that do it for you. Next to the fact that the base ability will also not work any more. So whatever you want, you already are at the limit.

besides the fact that there are way more then 20 basical ability mechanics, i still do not see why you would give a dummy 2 dummy abilities based off of the same spell; the one and only case where it would crash like described by you from before. most dummies have one ability, this one with 2 would just save some trigger-editing-time aswell as some triggering-time-ingame.

i do rly understand that my basical-offensive word-choice does challenge you in combination with the questions i ask in other threads & the low number of my entries aswell, but i'm an oldschool veteran, always tried to figgure that trigger stuff out by myself for 10 years before i asked google first time...it's no shame to lose this very little debate *jk* :p
don't get me wrong, i went off topic, i planned to say "you shoot further than the target distance", you want to do more than he wants and i think my simple, noobish solution does work for what he wants.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
You understand the collision wrong.
Go open a new map.
Create 2 new units. (no matter where they are based of)
Create 2 new abilities based of Slow... or whatever just make them the same base ability.
Give spell 1 to unit 1 and spell 2 to unit 2.
Make a third unit that cannot walk and has infinite health (training dummy).
Place all 3 units on the map and remove the standard triggers (at least the victory defeat conditions).

Cast spell 1 on the target and then spell 2 before the buff of spell 1 ended.
Now both buffs are removed.

That is the collision that I was talking about.
That is why you cannot base your spells of the same ability if you want buffs.
The only time that this does not happen is with auras.
That is why I use auras in my system.

Secondly, if you take a good look in the map that I posted, you see that the JASS part never has anything to do with the spell... kinda.
The spell is made in the GUI triggers. Without those triggers, the spell doesn't exist.
So for people who do not know JASS... you can use that same system (with some Custom Scripts but that is not a big deal).

Next to that... I always shoot further than the target is... at least, I shoot as far as I can. If the target is further than that, I can't reach it but if it is closer than that, I shoot further indeed.
I do that to make things better... for me, for you, for everyone.
For example, when you have worked with this system for a while, you can make amazing things.
Even I, the author, am still amazed what people can do with that system.
 
Status
Not open for further replies.
Top