• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Stun System

Status
Not open for further replies.
Hi, anyone knows stun system that will cooperate with build-in warcraft stun abilitites like bash, war stom, or thunderbolt? I already tryed BPower's and also wrote my own, but with no success. They bug original warcraft abilities making stun infinite (well, 3600sec to be precise) in some casses. Please don't point me to system based on "war stomp". Already tryed that.
 
Well, I already abandoned those broken stun systems today. I'll make 15 levels ability with 0.50sec duration to 7.50 and 15 dummy stunners. Avaiable durations from 0.50 to 7.50 with 0.50sec step are fine for me.
I want to report stun systems bug anyway:
1. warcraft stuns dont stack: game always choose longer stun
2. buffs however are updated (overwriten, but Im not sure if always) so the last ability's buff casted on target is visible on command card.
In this scenario bug will appear:
1. a unit is stunned by StunEngine for 8sec (it is 3600sec according to OE data)
2. after 1 sec, unit is stunned by, lets say, original bash for 1 sec.
Game decides to keep longer stun (3599sec) on unit, but buff is overwriten to Bash' buff.
StunEngine wants to remove stun by calling UnitRemoveAbility but that wont work cause unit already has no StunEngine's buff.

I dont blame stun systems authors, thats the way war3 works. Stun system should warn users that using any stun-abilities is not allowed when they decide to use stun system.
 
just use unified buff ids to avoid overwriting. nobody really need to know what kind of bash is it
just made short test, and you're right, the same buffs on stun engine and all other stun abilities used in map = works fine. Anyway, warn message with your solution should be added in stun system approved here, on Hive.
Solved.
edit cannot give you +rep, some error about "5 diffrent persons" appears:(
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
Then it will still not work properly.

Situation:
Unit gets stunned for 7.5 seconds (3600s in OE)
Wait 2 seconds
Unit gets stunned for 8 seconds by another spell.
wait 5.5 seconds
System's timer has expired and removes the buff so the unit is not stunned any more.
The unit should be stunned for 2.5 seconds more.
 
Wietlol, you absolutely right, I can confirm that. Its logic, and I ran a test: tt happends exactly like you said. My previous conclusions were to fast. DracoL1ch's solution just prevent us from infinite stun bug, but still Stun System idea is insecure. I think Ill stay with my primitive but save idea with miltilevel stun ability + dozen dummy stunners ;]
 
Level 12
Joined
May 22, 2015
Messages
1,051
In my (not-published and also inefficient) stun system, I used unit indexes to keep a count of stuns on a unit so that it won't remove the buff until the last stun is removed. It uses the aerial shackles ability since it doesn't interfere with normal stuns. It is inefficient because it will need to spawn a unit for each stun on a different unit. It does recycle the dummies at least.

When a unit is stunned by my system:
1:
If the counter is 0
- need to stun the unit (tries to recycle a dummy but spawns a new one if there are none)
- dummy casts aerial shackles
Else
- increase the counter for the unit

2:
Fire a timer to expire when the stun will expire (the number specified in the function call).

3:
When the timer expires, lower the counter for the unit by 1. If it is 0, stop the dummy and set it up to be recycled.

I don't know if that is helpful for you. My "system" is also pretty stuck into my map since I didn't really build it to be a library that people can use. I figure the ideas might come in handy, though.
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
I dont use standard stuns... at least not stuns that dont run outside of my stun system.
Hence why I dont have these glitches.

The method SAUS uses is exactly the same as mine, except I dont use aerial shackles... I use Mass Teleport.
Mass Teleport because it doesnt show a buff :D

You can implement this same method (counter up and down) with the pause/unpause unit which is really recommended.
It is the only way to make multiple resources that make use of that method work cooperatively.
 
Level 12
Joined
May 22, 2015
Messages
1,051
Ah, yes, I forgot about pausing units. I had to skip doing that, too, because I did not code all the spells in my map. Maybe one day when I have ported everything over (out of the object editor), I can just use pause with the counters.

The main problem with pausing units is that it bugs out with any duration effects, including stuff like earthquake and flame strike. They just don't do any damage to paused units lol. So every flame strike / other DOT spell you didn't code using triggers will not affect the stunned units.

I remember now that I made mine the way it is because it fit into my map without breaking anything that existed already (I hadn't used the aerial shackle ability for anything else, anyway).
 

Rheiko

Spell Reviewer
Level 27
Joined
Aug 27, 2013
Messages
4,216
The main problem with pausing units is that it bugs out with any duration effects, including stuff like earthquake and flame strike. They just don't do any damage to paused units lol. So every flame strike / other DOT spell you didn't code using triggers will not affect the stunned units.
Really? I didn't know that. How about that stun trick with channel ability? I'm pretty sure it won't cause this kind of bug and those abilities will cause damage to the paused unit normally.
 
Level 12
Joined
May 22, 2015
Messages
1,051
Really? I didn't know that. How about that stun trick with channel ability? I'm pretty sure it won't cause this kind of bug and those abilities will cause damage to the paused unit normally.
I'm not sure about the channel ability stun trick. I actually haven't used channel for anything before (except just a tiny bit of testing). I am very inexperienced with it :p
 
Status
Not open for further replies.
Top