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
Hope You enjoy it.
Change Log
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.
To get the units into the System
To get New units into the System
To get them in a group with event
And to show the damage taken and Effects Showen
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())
- Events
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
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
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]
- Loop - Actions
- Events
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)
- Events
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]
- Loop - Actions
- Unit Group - Pick every unit in ADG[1] and do (Actions)
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
- If - Conditions
- 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 - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- 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
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
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