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: 247
  • Damage String & Effect System (DSES) v1.03.w3x
    27.3 KB · Views: 282

Romek

Super Moderator
Reaction score
963
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,462
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
963
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.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top