- Joined
- May 20, 2008
- Messages
- 138
After I added these triggers my map Warcraft shuts down without an error message whenever an event that would make "Damage increase" trigger happens. How do I fix this?
This trigger is run via the Map Initialization trigger
P_HERO_DMG_MULTIPLIER_LEVEL is an integer variable that gets a value depending on how many players there are in the map. If only I am playing, this value becomes 10. I've verified that this works with the Game - Text Message actions. Also, this trigger picks all units on the map belonging to player 12, and adds to the trigger "Damage increase" an event that checks if the unit takes damage
This is the trigger that shuts down the game. When I, player 1, attacks a unit that belongs to player 12, who is an enemy of me, this trigger should add some extra damage depending on what the array value of P_HERO_DMG_MULTIPLIER[] is. The array value is set by the integer P_HERO_DMG_MULTIPLIER_LEVEL that I talked about in the previous trigger.
Basically this system is meant to add some extra damage to the players attacks depending on how many players are playing. What it should do when one player is playing like when I test it, is adding 9 times the damage dealt each time a unit belonging to player 12 is damaged by a unit belonging to an enemy of him (in this case, me, player 1). Why does it shut down the game?
P.S. I know the floating text part doesn't display the correct values yet, but I didn't get that far as to bother to fix it since the game shuts down at the same moment my attack lands on the enemy unit.
This trigger is run via the Map Initialization trigger
P_HERO_DMG_MULTIPLIER_LEVEL is an integer variable that gets a value depending on how many players there are in the map. If only I am playing, this value becomes 10. I've verified that this works with the Game - Text Message actions. Also, this trigger picks all units on the map belonging to player 12, and adds to the trigger "Damage increase" an event that checks if the unit takes damage
-
Init Player Spells
-
Events
-
Conditions
-
Actions
-
Set P_HERO_DMG_MULTIPLIER[1] = 0.00
-
Set P_HERO_DMG_MULTIPLIER[2] = 0.12
-
Set P_HERO_DMG_MULTIPLIER[3] = 0.25
-
Set P_HERO_DMG_MULTIPLIER[4] = 0.43
-
Set P_HERO_DMG_MULTIPLIER[5] = 0.66
-
Set P_HERO_DMG_MULTIPLIER[6] = 1.00
-
Set P_HERO_DMG_MULTIPLIER[7] = 1.50
-
Set P_HERO_DMG_MULTIPLIER[8] = 2.33
-
Set P_HERO_DMG_MULTIPLIER[9] = 4.00
-
Set P_HERO_DMG_MULTIPLIER[10] = 9.00
-
Set P_HERO_DMG_MULTIPLIER_LEVEL = (12 - (Number of players in (All players matching (((Matching player) slot status) Equal to Is playing))))
-
Game - Display to (All players) the text: (String(P_HERO_DMG_MULTIPLIER[P_HERO_DMG_MULTIPLIER_LEVEL]))
-
Game - Display to (All players) the text: (String(P_HERO_DMG_MULTIPLIER_LEVEL))
-
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Picked unit)) Equal to Player 12 (Brown)
-
-
Then - Actions
-
Trigger - Add to Damage increase <gen> the event (Unit - (Picked unit) Takes damage)
-
-
Else - Actions
-
-
-
-
-
This is the trigger that shuts down the game. When I, player 1, attacks a unit that belongs to player 12, who is an enemy of me, this trigger should add some extra damage depending on what the array value of P_HERO_DMG_MULTIPLIER[] is. The array value is set by the integer P_HERO_DMG_MULTIPLIER_LEVEL that I talked about in the previous trigger.
-
Damage increase
-
Events
-
Conditions
-
((Damage source) belongs to an enemy of Player 12 (Brown)) Equal to True
-
-
Actions
-
Unit - Cause (Damage source) to damage (Triggering unit), dealing ((Damage taken) x P_HERO_DMG_MULTIPLIER[P_HERO_DMG_MULTIPLIER_LEVEL]) damage of attack type Spells and damage type Unknown
-
Floating Text - Create floating text that reads (String((Damage taken))) above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.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 50.00 towards 90.00 degrees
-
Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
-
-
Basically this system is meant to add some extra damage to the players attacks depending on how many players are playing. What it should do when one player is playing like when I test it, is adding 9 times the damage dealt each time a unit belonging to player 12 is damaged by a unit belonging to an enemy of him (in this case, me, player 1). Why does it shut down the game?
P.S. I know the floating text part doesn't display the correct values yet, but I didn't get that far as to bother to fix it since the game shuts down at the same moment my attack lands on the enemy unit.