Need help for stunning through triggers

Nyph

Occasional News Reader
Reaction score
87
I'm working on a small project and I need to be able to trigger a stun.
What i mean is to have a stun and remove it after the time is up with triggers.
The problem is that if a unit is stunned and then stunned again it will come out of the second stun early.
Does anyone know how to fix this?
 

w00t22

CSS L4D DoD? Steam ID = w00t22
Reaction score
43
i did this for my spell, create a special buff for your stun thats called Stun 2 or somthing than when you go to remove the buff it removes that stun
 

Nyph

Occasional News Reader
Reaction score
87
hmm that doesnt seem to work because i want x number of stuns overlapping each other not just 2, and for your method i would have to make a new buff for each one i want attached to the target.And plus there is a buff limit.
 

Somatic

You can change this now in User CP.
Reaction score
84
Erm just remove the Buff the stun ability is based off. That should work.
 

Nyph

Occasional News Reader
Reaction score
87
no because it will remove overlapped stuns because I'm using waits
 

chovynz

We are all noobs! in different states of Noobism!
Reaction score
130
How many stuns do you want to stack? Make a separate channel stun for each of the stuns you want to allow for. That way you can refer to each as it is applied.
 

Nyph

Occasional News Reader
Reaction score
87
no. You guys probably don't understand where im coming from.
I have trigger that creates a dummy that casts an infinitely long stun on a unit, then after x seconds the buff is removed, the problem with that is if say, x = 5 and the unit gets stunned once and 2 seconds into the stun he gets stunned again by the trigger, it will remove the buff 3 seconds after, not 5.
 

Somatic

You can change this now in User CP.
Reaction score
84
I think i got it, you are running this trigger on a Global Variable?

Thats the reason why because the Variable is being over written non stop. Thus causing the timer problem.

i get what you mean.

A got stun and its removed after 5 second.
A got stun again after 2 second (First stun removing in 3 sec, 2nd stun in 5 sec)
A got release from stun (5 second full for 1st stun and still 2 Sec left for 2nd stun)

Right?

USe Local to solve this
 

Nyph

Occasional News Reader
Reaction score
87
i am using locals, it's removing the buff that isn't working
 

Somatic

You can change this now in User CP.
Reaction score
84
In that case can you calculate roughly how many times a unit can be stunned at the Maximun? IF you can then i suggest you use more then 1 Stun buff, and detect if a unit has the Buff alrd and then use a "Level X + 1" Stun to stun the target.

Edit : Forget it, use a 1 sec stun to do the job. Make it such that you get a trigger to calculate how long u want this unit to be stunned and then make a loop to stun this unit constantly every second.
Thats the best i can think of for now.
 

Nyph

Occasional News Reader
Reaction score
87
you gave me an idea... what if i detect if the unit already has the buff then prevent it from being removed for the next x amount of seconds... dunno how though

edit: and i forgot to tell you - x is a real
 

Somatic

You can change this now in User CP.
Reaction score
84
wait. I got an idea. You can check how long a Timer is left in running i belive. If so you can determine how long a unit can still get stun.
 

Nyph

Occasional News Reader
Reaction score
87
good idea but to make it mui it needs handle vars and I'm not to sure on how to do them
 

Somatic

You can change this now in User CP.
Reaction score
84
Go read up on "Advance Jass Tips" By Daelin. I think its in the Jass Forum's Sticky Thread with the Guide. It will give you quite a good idea about it. Im learning the skills for that too now....
 
Reaction score
333
Answer this question and I will make a snippet of code (vJass) for you:

When a unit is stunned:

a. The stun overrides any current stun (like normal war3).
b. The stun duration is added to the duration of any current stun.
c. The unit will be stunned for the full duration of the stun or of any current stun.
 

Nyph

Occasional News Reader
Reaction score
87
yeh i've read that like a dozen times but i still don't entirely get how to do them properly - especially in gui - bring on the custom script lol

edit: a. The stun overrides any current stun (like normal war3).
edit edit: can you explain more on c.
 
Reaction score
333
yeh i've read that like a dozen times but i still don't entirely get how to do them properly - especially in gui - bring on the custom script lol

edit: a. The stun overrides any current stun (like normal war3).
edit edit: can you explain more on c.

Instead of the latest stun overriding previous stuns, the stun that will run out first will be overwritten by the stun that will expire last.

So, for example, if I stun someone for 5 seconds, and then I wait 1 second and stun someone for 3 seconds, the 5 second stun is not canceled.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top