- Joined
- Feb 21, 2008
- Messages
- 205
Electric Discharge:
The Engineer puts on a battery which can store electricity, electricity has a chance to be produced when the engineer is hit, More electricity is produced the higher level this ability is. The Engineer can discharge this electricity to hurl a chain lightning at target enemies, this ability bounces more and damages more the more electricity it has charged up.
Triggers1:
Trigger 2:
And the third:
Any clue what could be wrong here?
The Engineer puts on a battery which can store electricity, electricity has a chance to be produced when the engineer is hit, More electricity is produced the higher level this ability is. The Engineer can discharge this electricity to hurl a chain lightning at target enemies, this ability bounces more and damages more the more electricity it has charged up.
Triggers1:
-
Is attacked trigger
-
Events
- Unit - A unit Is attacked
-
Conditions
- (Level of Electric Discharge for (Attacked unit)) Greater than or equal to 1
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Random integer number between 1 and 5) Equal to 1
-
Then - Actions
- Special Effect - Create a special effect at (Position of (Attacked unit)) using Abilities\Spells\Orc\Purge\PurgeBuffTarget.mdl
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Electric Discharge for (Attacked unit)) Equal to 1
-
Then - Actions
- Set Some_number_variable = (Some_number_variable + 1)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Electric Discharge for (Attacked unit)) Equal to 2
-
Then - Actions
- Set Some_number_variable = (Some_number_variable + 2)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Electric Discharge for (Attacked unit)) Equal to 3
-
Then - Actions
- Set Some_number_variable = (Some_number_variable + 3)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Electric Discharge for (Attacked unit)) Equal to 4
-
Then - Actions
- Set Some_number_variable = (Some_number_variable + 4)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Electric Discharge for (Attacked unit)) Equal to 5
-
Then - Actions
- Set Some_number_variable = (Some_number_variable + 5)
-
Else - Actions
- Do nothing
-
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
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
Trigger 2:
-
Cast spell trigger
-
Events
- Unit - A unit Finishes casting an ability
-
Conditions
- (Ability being cast) Equal to Electric Discharge
-
Actions
- Set Electric_target = (Target unit of ability being cast)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Some_number_variable Equal to 1
-
Then - Actions
- Unit - Create 1 Dummy Caster unit for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
- Unit - Add Chain lightning (dummy) to (Last created unit)
- Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
- Unit - Set level of Chain lightning (dummy) for (Last created unit) to 1
- Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning Electric_target
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Some_number_variable Equal to 2
-
Then - Actions
- Unit - Create 1 Dummy Caster unit for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
- Unit - Add Chain lightning (dummy) to (Last created unit)
- Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
- Unit - Set level of Chain lightning (dummy) for (Last created unit) to 2
- Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning Electric_target
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Some_number_variable Equal to 4
-
Then - Actions
- Unit - Create 1 Dummy Caster unit for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
- Unit - Add Chain lightning (dummy) to (Last created unit)
- Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
- Unit - Set level of Chain lightning (dummy) for (Last created unit) to 4
- Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning Electric_target
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Some_number_variable Equal to 5
-
Then - Actions
- Unit - Create 1 Dummy Caster unit for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
- Unit - Add Chain lightning (dummy) to (Last created unit)
- Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
- Unit - Set level of Chain lightning (dummy) for (Last created unit) to 5
- Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning Electric_target
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Some_number_variable Equal to 6
-
Then - Actions
- Unit - Create 1 Dummy Caster unit for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
- Unit - Add Chain lightning (dummy) to (Last created unit)
- Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
- Unit - Set level of Chain lightning (dummy) for (Last created unit) to 6
- Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning Electric_target
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Some_number_variable Equal to 7
-
Then - Actions
- Unit - Create 1 Dummy Caster unit for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
- Unit - Add Chain lightning (dummy) to (Last created unit)
- Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
- Unit - Set level of Chain lightning (dummy) for (Last created unit) to 7
- Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning Electric_target
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Some_number_variable Equal to 8
-
Then - Actions
- Unit - Create 1 Dummy Caster unit for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
- Unit - Add Chain lightning (dummy) to (Last created unit)
- Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
- Unit - Set level of Chain lightning (dummy) for (Last created unit) to 8
- Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning Electric_target
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Some_number_variable Equal to 9
-
Then - Actions
- Unit - Create 1 Dummy Caster unit for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
- Unit - Add Chain lightning (dummy) to (Last created unit)
- Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
- Unit - Set level of Chain lightning (dummy) for (Last created unit) to 9
- Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning Electric_target
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Some_number_variable Equal to 10
-
Then - Actions
- Unit - Create 1 Dummy Caster unit for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
- Unit - Add Chain lightning (dummy) to (Last created unit)
- Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
- Unit - Set level of Chain lightning (dummy) for (Last created unit) to 10
- Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning Electric_target
-
Else - Actions
- Do nothing
-
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
-
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
-
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
-
Events
And the third:
-
Reducing electric discharge
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Some_number_variable Greater than 10
-
Then - Actions
- Set Some_number_variable = (Some_number_variable - 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
Any clue what could be wrong here?