System Damage String & Effect System

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
HI just a nice battle system for most maps

The System is:
GUI
MUI
Leakless
Lagless

What This System Does:
1. It detects damage and displays it in a string. The colour can be easily changed but currently red. The more damage recieved the darker the colour becomes. 500 damage is when the colour is 100% red but can be raised or lowered easily.
2. It displays blood as units take damage and the more damage taken the more blood is displayed. There are 4 levels of blood each one displays more blood the higher the level. The levels are separated by how much damage is taken. These Levels can be changed easily.
3. If the damage taken is enough to kill a unit the system will show which player killed him and with what unit. So there is a 50\50 % chance to show Murdered by and Killed by. If you have any new Strings names for the Please share them. It will also display text to all players if one player killed another players hero by showing the name of the hero killed owner the the killing unit owner and the killing unit. This can be disabled by changing an integer.
Thx to wellwish3r for help on the string colour

Code
This is Where you set the values of what the system does.
Trigger:
  • Configiration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- This is the damage that separtes the effects --------
      • -------- Dont Touch --------
      • Set Spawn_Effect_Damage[1] = 1
      • -------- Average damage of your units --------
      • Set Spawn_Effect_Damage[2] = 25
      • -------- Average damage of Spells --------
      • Set Spawn_Effect_Damage[3] = 50
      • -------- Above Normal damage of spells --------
      • Set Spawn_Effect_Damage[4] = 75
      • -------- Most damaging Spell --------
      • Set Spawn_Effect_Damage[4] = 100
      • -------- Dont Touch unless Spells Deal more damage the this --------
      • Set Spawn_Effect_Damage[5] = 500
      • -------- Some other Stuff --------
      • -------- This is tha colour max amount eg 0.10 would make the max red at 1000 damage. 0.50 makes it 500 --------
      • Set Damage_Colour = 0.50
      • -------- The Size of the Text --------
      • Set Size = 15.00
      • -------- The Speed of the Text --------
      • Set Speed = 128.00
      • -------- The time of the Text for Damage --------
      • Set Time[1] = 1.00
      • -------- The time of the Text for Kill --------
      • Set Time[2] = 2.00
      • -------- This is the Effect the is showen when damage taken --------
      • Set Damage_SFX = Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
      • -------- This is where you set if name of killing should be showen. 1 is on 2 is off --------
      • Set On_or_Off = 1
      • -------- This disables stuuf of the system that can be activated during the game --------
      • Set Boolean[1] = True
      • Set Boolean[2] = True
      • Set Boolean[3] = True
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())

Trigger:
  • Disable and Enable
    • Events
      • Player - Player 1 (Red) types a chat message containing -DE as A substring
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to -DEFX
        • Then - Actions
          • If (Boolean[1] Equal to True) then do (Set Boolean[1] = False) else do (Set Boolean[1] = True)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Entered chat string) Equal to -DEText
            • Then - Actions
              • If (Boolean[2] Equal to True) then do (Set Boolean[2] = False) else do (Set Boolean[2] = True)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Entered chat string) Equal to -DEAll
                • Then - Actions
                  • If (Boolean[3] Equal to True) then do (Set Boolean[3] = False) else do (Set Boolean[3] = True)
                • Else - Actions

To get the units into the System
Trigger:
  • Install
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Set ADG[1] = (Units in (Playable map area))
      • Unit Group - Pick every unit in ADG[1] and do (Actions)
        • Loop - Actions
          • Trigger - Add to DDS <gen> the event (Unit - (Picked unit) Takes damage)
          • Unit Group - Remove (Picked unit) from ADG[1]

To get New units into the System
Trigger:
  • Install DG
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Unit Group - Add (Triggering unit) to ADG[1]
      • Trigger - Run Event Add <gen> (ignoring conditions)

To get them in a group with event
Trigger:
  • Event Add
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in ADG[1] and do (Actions)
        • Loop - Actions
          • Trigger - Add to DDS <gen> the event (Unit - (Picked unit) Takes damage)
          • Unit Group - Remove (Picked unit) from ADG[1]

And to show the damage taken and Effects Showen
Trigger:
  • DDS
    • Events
    • Conditions
      • Boolean[3] Equal to True
    • Actions
      • -------- Here you Set The String Colour for Damage taken --------
      • Set Colour_Text_Red[1] = 100.00
      • Set Colour_Text_Green[1] = (100.00 - ((Damage taken) x Damage_Colour))
      • Set Colour_Text_Blue[1] = (100.00 - ((Damage taken) x Damage_Colour))
      • -------- Here you Set The String Colour for when a unit is killed --------
      • Set Colour_Text_Red[2] = 0.00
      • Set Colour_Text_Green[2] = 100.00
      • Set Colour_Text_Blue[2] = 0.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Boolean[2] Equal to True
          • (Life of (Triggering unit)) Less than or equal to (Damage taken)
          • On_or_Off Equal to 1
        • Then - Actions
          • If (((Triggering unit) is A Hero) Equal to True) then do (Game - Display to (All players) for 7.00 seconds the text: ((Name of (Owner of (Damage source))) + ( has killed + ((Name of (Triggering player)) + ('s + (Name of (Triggering unit))))))) else do (Do nothing)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than or equal to 50
            • Then - Actions
              • Floating Text - Create floating text that reads (Killed by + ((Name of (Owner of (Damage source))) + ('s + (Name of (Damage source))))) above (Triggering unit) with Z offset 0.00, using font size Size, color (Colour_Text_Red[2]%, Colour_Text_Green[2]%, Colour_Text_Blue[2]%), and 0.00% transparency
              • Floating Text - Set the velocity of (Last created floating text) to Speed towards (Angle from (Position of (Triggering unit)) to (Position of (Damage source))) degrees
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to Time[2] seconds
            • Else - Actions
              • Floating Text - Create floating text that reads (Murdered by + ((Name of (Owner of (Damage source))) + ('s + (Name of (Damage source))))) above (Triggering unit) with Z offset 0.00, using font size Size, color (Colour_Text_Red[2]%, Colour_Text_Green[2]%, Colour_Text_Blue[2]%), and 0.00% transparency
              • Floating Text - Set the velocity of (Last created floating text) to Speed towards (Angle from (Position of (Triggering unit)) to (Position of (Damage source))) degrees
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to Time[2] seconds
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Boolean[2] Equal to True
              • (Integer((Damage taken))) Greater than or equal to Spawn_Effect_Damage[1]
            • Then - Actions
              • Floating Text - Create floating text that reads (String((Damage taken))) above (Triggering unit) with Z offset 0.00, using font size Size, color (Colour_Text_Red[1]%, Colour_Text_Green[1]%, Colour_Text_Blue[1]%), and 0.00% transparency
              • Floating Text - Set the velocity of (Last created floating text) to Speed towards (Angle from (Position of (Triggering unit)) to (Position of (Damage source))) degrees
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to Time[1] seconds
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Boolean[1] Equal to True
          • (((Triggering unit) is A structure) Equal to False) and (((Triggering unit) is Mechanical) Equal to False)
          • (Integer((Damage taken))) Greater than or equal to Spawn_Effect_Damage[1]
          • (Integer((Damage taken))) Less than or equal to Spawn_Effect_Damage[2]
        • Then - Actions
          • Special Effect - Create a special effect attached to the chest of (Triggering unit) using Damage_SFX
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Boolean[1] Equal to True
              • (Integer((Damage taken))) Greater than or equal to Spawn_Effect_Damage[2]
              • (Integer((Damage taken))) Less than or equal to Spawn_Effect_Damage[3]
            • Then - Actions
              • Special Effect - Create a special effect attached to the chest of (Triggering unit) using Damage_SFX
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect attached to the head of (Triggering unit) using Damage_SFX
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Boolean[1] Equal to True
                  • (Integer((Damage taken))) Greater than or equal to Spawn_Effect_Damage[3]
                  • (Integer((Damage taken))) Less than or equal to Spawn_Effect_Damage[4]
                • Then - Actions
                  • Special Effect - Create a special effect attached to the chest of (Triggering unit) using Damage_SFX
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Create a special effect attached to the head of (Triggering unit) using Damage_SFX
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Create a special effect attached to the (hand + left) of (Triggering unit) using Damage_SFX
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Create a special effect attached to the (hand + right) of (Triggering unit) using Damage_SFX
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Boolean[1] Equal to True
                      • (Integer((Damage taken))) Greater than or equal to Spawn_Effect_Damage[4]
                      • (Integer((Damage taken))) Less than or equal to Spawn_Effect_Damage[5]
                    • Then - Actions
                      • Special Effect - Create a special effect attached to the chest of (Triggering unit) using Damage_SFX
                      • Special Effect - Destroy (Last created special effect)
                      • Special Effect - Create a special effect attached to the head of (Triggering unit) using Damage_SFX
                      • Special Effect - Destroy (Last created special effect)
                      • Special Effect - Create a special effect attached to the (hand + left) of (Triggering unit) using Damage_SFX
                      • Special Effect - Destroy (Last created special effect)
                      • Special Effect - Create a special effect attached to the (hand + right) of (Triggering unit) using Damage_SFX
                      • Special Effect - Destroy (Last created special effect)
                      • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Damage_SFX
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions

Hope You enjoy it.
Change Log
Code:
ChangeLog
v1.00 Released
v1.01 Updated
v1.02 Fix the Group that Registered to many Units
v1.03 Text fix and Made Able to Disable during game
 

Attachments

  • Damage String & Effect System (DSES) v1.02.w3x
    25.6 KB · Views: 249
  • Damage String & Effect System (DSES) v1.03.w3x
    27.3 KB · Views: 284

Romek

Super Moderator
Reaction score
964
Could you write that first paragraph in English please.
 

GetTriggerUnit-

DogEntrepreneur
Reaction score
129
mhm.
Isn't that the problem that you just been helped on?
Maybe add contributors, everyone who helped me solving my problem.

ofc ->Means of course?
I guess it's too long to write. :p

cuctomizable?!1116??1|
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Ok My English marks im not very proud of but there
 

Accname

2D-Graphics enthusiast
Reaction score
1,463
Code:
Trigger:Event Add
Events
Conditions
Actions[COLOR="Red"]
 Unit Group - Pick every unit in ADG and do (Actions)
      Loop - Actions
            Trigger - Add to DDS <gen> the event (Unit - (Picked unit) Takes damage)
[/COLOR]
i think this trigger will mess it up, as far as i see a preplaced unit is added to the ADG group at map initialization and after another unit is spawned ALL units in ADG will be added to the damage detection system no matter if they are already in or not.
you should remove them from the unit group ADG after you add the event 'unit takes damage'
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Sory but i am not quite folowing you. When a unit enters its added to the group and then and the new event to count the new units aswell
 

WolfieeifloW

WEHZ Helper
Reaction score
372
He means you're not removing units already in that group when they get added to the damage trigger.

Example;
Unit1 is in group ADG.
Him taking damage gets added to "DDS" (The trigger) .

Now, Unit2 enters the map.
He gets added to the group ADG.
"Event Add" (The trigger) gets run.

Unit1 and Unit2 are added to "DDS".

Unit1 is going to fire "DDS" off twice everytime he takes damage.


EDIT: There should also be options to turn on/off the floating texts (A simple boolean) .
And make the special effects configurable.
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
@Jesus4lyf: ok il make it .03 and i think that doesnt leak. @WolfieNoCT: now i understand there are 2 events i though when i added the new event the old one got overriden
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Ok leak Fixed
Effects More Configurable
Showes diffrent string when units killed.
Currently.
50% Murder by Unit Name
50% Killed by Unit Name
any sugestions on new names to show when killed will be apreciated
or to improve the system.
 

Romek

Super Moderator
Reaction score
964
Could you write that first paragraph in English please.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Why do you have an If/Then/Else when you're not even using it for the Conditions or the Else.
Just put them in as plain actions with comments in between the specify the different parts.
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
I though it would make it better to configire but il take it out
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
I wouldnt exactly call my system a damage detection system but with a little changes it can be turned into one
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
I think this is the 6th bump not sure lost count
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • 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 Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top