• 🏆 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!

[GUI]Stun system v1.6

  • Like
Reactions: Losam and xorkatoss
Stun system (GUI)
by KhaosMachine

I made this system because I have not found any GUI stun system, also maybe some map-makers want this system in GUI and not in vJASS or JASS.This is easily to configure, you have only to read the import and configure instructions into the map.



  • @Birbe, for the 'Unit indexer' system
  • @Adiktuz for some tips
  • @Magtheridon96 for all suggest ;)


  • Stun system 1.6
    —Removed the next variables:
    •udg_SS_String_SpecialEffect
    •udg_SS_Boolean_Preload
    —New stun method: when you use the stun system the target will move at random distance at random angle and will be stunned there, then back to the his start point
    —Code optimized
    —New all variables are into the SSystem, because you may be confused with the names (TempPoint, TempUnit, etc.)
  • Stun system 1.5
    —New variable named "SS_Boolean_Preload", it function is preload the special effect that you want
    —Some fixes on the code
    —Removed a bug (when you stun a unit in the same position of another, the second unit will be stunned)
  • Stun system 1.4
    —Optimized
  • Stun system 1.3 (now it's a real system)
    —Optimized (functions now, are all together in one trigger)
    —Changed the function to start the system (Now it's
    • Custom script: call ExecFunc("StunSystem_Run")
    )
  • Stun system 1.2
    —Changed the stun spell from 'Storm bolt' to 'War stomp'
    —Added a new variable (SS_String_SpecialEffectTarget), you can choose an effect model if you want for the target
    —Fixed some wrong position of the triggers
    —Changed some map strings
  • Stun system 1.1
    —100% Free from leaks
  • Stun system 1.0
    —First release
    —Now you have to put only 5 actions into your trigger to run the stun system

Made by
zH8Wj.png



IF ANYONE CAN POST THE TRIGGERS FOR ME, THANKS!!! (I can't because I have the software in spanish language)

Keywords:
stun system gui, war3 stun system, stun, system, stun system mui, stun mui, stun gui, system gui, system mui, hiveworkshop, world editor stun, easy sy
Contents

Untitled (Map)

Reviews
09:55, 18th Jul 2012 Magtheridon96: Approved. Recommended because it's the only GUI resource that provides an instant stun. (Using hoofstomp)

Moderator

M

Moderator

09:55, 18th Jul 2012
Magtheridon96: Approved.

Recommended because it's the only GUI resource that provides an instant stun. (Using hoofstomp)
 

  • Stun system configuration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- CONFIGURATION --------
      • -------- The unit-type that cast the stun ability --------
      • Set SS_UnitType_Dummy = Dummy
      • -------- The ability that stuns the target --------
      • Set SS_Ability_Stun = Stun
      • -------- The string order of the stun ability --------
      • Set SS_String_Order = thunderbolt
      • -------- The buff of the stun ability --------
      • Set SS_Buff_Stun = Stunned (Pause)
      • -------- CONFIGURATION --------
      • -------- PRELOAD SYSTEM --------
      • Set TempPlayer = Player 1 (Red)
      • Set TempPoint = (Center of (Playable map area))
      • Unit - Create 1 SS_UnitType_Dummy for TempPlayer at TempPoint facing 0.00 degrees
      • Set TempUnit = (Last created unit)
      • Unit - Add SS_Ability_Stun to TempUnit
      • Unit - Remove TempUnit from the game
      • Custom script: call RemoveLocation(udg_TempPoint)
      • -------- PRELOAD SYSTEM --------
  • Stun system
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in SS_UnitGroup_Group and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • Set ID = (Custom value of TempUnit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SS_Real_0000[ID] Greater than or equal to 0.00
            • Then - Actions
              • Set SS_Real_0000[ID] = (SS_Real_0000[ID] - 0.05)
            • Else - Actions
              • Unit - Remove SS_Buff_Stun buff from TempUnit
              • Unit Group - Remove TempUnit from SS_UnitGroup_Group
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (SS_UnitGroup_Group is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions



  • ESC
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • -------- ********************************************************************* --------
      • -------- YOU HAVE TO PUT ALL THIS FUNCTIONS INTO YOUR TRIGGER TO MAKE SS WORKS --------
      • -------- ********************************************************************* --------
      • -------- SET THE TARGET OF THE STUN --------
      • Set SS_Unit_Target = (Random unit from (Units in (Playable map area)))
      • -------- SET THE DURATION OF THE STUN --------
      • Set SS_Real_Duration = 1.25
      • -------- SET TRUE/FALSE TO STACK THE STUN --------
      • Set SS_Boolean_Stack = True
      • -------- SET TRUE/FALSE TO SEE THE TEXT --------
      • Set SS_Boolean_Text = True
      • -------- DON'T TOUCH THIS --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SS_Unit_Target Not equal to No unit
        • Then - Actions
          • Set TempPoint = (Position of SS_Unit_Target)
          • Set TempUnit2 = SS_Unit_Target
          • Set ID = (Custom value of TempUnit2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SS_Boolean_Stack Equal to True
            • Then - Actions
              • Set SS_Real_0000[ID] = (SS_Real_0000[ID] + SS_Real_Duration)
            • Else - Actions
              • Set SS_Real_0000[ID] = SS_Real_Duration
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SS_Boolean_Text Equal to True
            • Then - Actions
              • Floating Text - Create floating text that reads (Substring((String(SS_Real_0000[ID])), 1, 4)) at TempPoint with Z offset 80.00, using font size 10.00, color (70.00%, 70.00%, 100.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
              • Floating Text - Change the fading age of (Last created floating text) to 1.20 seconds
              • Floating Text - Change the lifespan of (Last created floating text) to 1.75 seconds
            • Else - Actions
          • Unit - Create 1 SS_UnitType_Dummy for Neutral Hostile at TempPoint facing 0.00 degrees
          • Set TempUnit = (Last created unit)
          • Unit - Add SS_Ability_Stun to TempUnit
          • Custom script: call IssueTargetOrder(udg_TempUnit, udg_SS_String_Order, udg_TempUnit2)
          • Unit - Add a 0.50 second Generic expiration timer to TempUnit
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (SS_UnitGroup_Group is empty) Equal to True
            • Then - Actions
              • Trigger - Turn on Stun system <gen>
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (SS_Unit_Target is in SS_UnitGroup_Group) Equal to True
            • Then - Actions
            • Else - Actions
              • Unit Group - Add SS_Unit_Target to SS_UnitGroup_Group
          • Custom script: call RemoveLocation(udg_TempPoint)
        • Else - Actions
          • Game - Display to (All players) the text: You entered an inva...
      • -------- ********************************************************************* --------
      • -------- YOU HAVE TO PUT ALL THIS FUNCTIONS INTO YOUR TRIGGER TO MAKE SS WORKS --------
      • -------- ********************************************************************* --------


Edit: Doesn't this just use thunderbolt to stun units, for an indefinately time, and then remove the buff when the timer runs out for how long they have to be stunned? Well I guess it works and it is a good idea. the actual system is really simple though, I guess you could do the same with entangle roots or any other spell similar to it.
 
If I'll use this + your Hunter's mark, I bet they would collide because they both use custom value of unit... also, you're not setting the custom value to any value, wouldn't that make it bug?

Also a system should be usable without copy pasting long code/trigg for every spell that you need it to work on... on your case, the user needs to copy paste those actions on the sample trigger for every spell he wants to have the custom stun, so it defeats the purpose of having a "system"... You should make this "system" usable with maybe just one function call or one trigger evaluation...

anyway, my main concern here is the "system" part...

as for the idea, well its really nothing new... It has always been the answer for custom stuns and is widely used...
 
Last edited:
Level 8
Joined
Dec 30, 2011
Messages
134
@Magtheridon96

Honestly, the best stun to use would be Hoof Stomp.
It's the only instant stun in the game.

The others have a very tiny unnoticeable delay.
Of course, with code, this may be noticeable. (Stun detection systems use orders to detect stuns. Only hoof stomp allows your units to be stunned immediately after. (Meaning no delay)

Then, you suggest to change the stun ability from Storm bolt to Hoof stomp?


I changed the ability, take a view now please and tell me what do you think =)


MY OPINION:I THINK A AOE STUN FOR THE STUN SYSTEM ISN'T GOOD, BECAUSE IF YOU TURN THE COLLISION OF AN UNIT AND SET HE POSITION TO THE SAME POSITION OF ANOTHER UNIT, AND THEN I USE THE STUN, THAT TWO UNITS RESULT STUNNED... FOR EXAMPLE(THE 4th SKILL OF THE MAGNATAUR OF DOTA MAP)
 
Last edited:
Level 8
Joined
Dec 30, 2011
Messages
134
I Have a Quest for You:

JASS:
If I Did For A Buff Use the Same Base, But Characteristics of different (such as name and icon Buff) A Serious Error would occur on your system?

No!, you can use a copied buff or same buff with your own effects, attachpoints and can change the description of the buff without problems...

But you have to configure the buff of the spell in the ability editor and if you make a new buff. configure the trigger with that buff :)
 
Level 8
Joined
Feb 17, 2007
Messages
368
An important thing to note about this system that took me a bit to debug the source of a problem, where you cannot destroy the trigger in which this function/actions exist. Most people destroy their map initialization trigger to improve map performance, and only have 1 initialization trigger as it prevents the big problems with multiple initialization triggers. So I was destroying the trigger with these functions, and it rendered the whole system useless and not working. Not sure if there's a way you could fix this? You definitely should if you can or at least edit the test map and put the event as time elapsed equal to 0 instead of map init.
 
Level 8
Joined
Dec 30, 2011
Messages
134
An important thing to note about this system that took me a bit to debug the source of a problem, where you cannot destroy the trigger in which this function/actions exist. Most people destroy their map initialization trigger to improve map performance, and only have 1 initialization trigger as it prevents the big problems with multiple initialization triggers. So I was destroying the trigger with these functions, and it rendered the whole system useless and not working. Not sure if there's a way you could fix this? You definitely should if you can or at least edit the test map and put the event as time elapsed equal to 0 instead of map init.

A tip for you: destroy triggers don't make a better performance, because it is used only at the initialization of the map..
 
They take up 4 bytes of memory. That's practically nothing compared to a location's 361 bytes.

Plus, you can combine your map init triggers.

edit

Especially if they are really long and have a lot of things set.

No.
A 1-line trigger takes up the same space as a 10000-line trigger.

The amount of spaces they take up depends on the number of conditions and actions registered.
In GUI, it will always be either 1 or 0 conditions since they're merged, and 1 or 0 actions.
 
Top