- Joined
- Dec 12, 2008
- Messages
- 7,379
Guys, I'm having a problem with this spell i'm working on for the Spells and Systems Mini-Contest (#18) or (#19) (i forgot which )
The spell won't put enemy units to sleep and it won't damage them!
What could be the problem?
Here are the triggers:
Please help!
If i don't fix it before April 1, i'll be disqualified
The spell won't put enemy units to sleep and it won't damage them!
What could be the problem?
Here are the triggers:
-
Lame Joke Init
-
Events
- Map initialization
- Conditions
-
Actions
- -------- -------------- --------
- -------- Dummy Unit --------
- -------- -------------- --------
- Set DummyType = Sleep Dummy
- -------- -------------- --------
- -------- Dummy Abilities --------
- -------- -------------- --------
- Set DummyAbilities = Tomato
- -------- -------------- --------
- -------- Time before first floating text --------
- -------- -------------- --------
- Set Reals[1] = 1.00
- -------- -------------- --------
- -------- Time before second floating text --------
- -------- (Must be Greater than Reals[1]) --------
- -------- -------------- --------
- Set Reals[2] = 3.70
- -------- -------------- --------
- -------- Throw Tomato Chance --------
- -------- -------------- --------
- Set Reals[3] = 80.00
- -------- -------------- --------
- -------- Damage Per Level --------
- -------- -------------- --------
- Set Reals[4] = 75.00
- -------- -------------- --------
- -------- Say Joke at... --------
- -------- (Must be greater than Reals[2]) --------
- -------- -------------- --------
- Set Reals[5] = 5.60
- -------- -------------- --------
- -------- Text Font --------
- -------- -------------- --------
- Set Reals[6] = 14.00
- -------- -------------- --------
- -------- Text Velocity --------
- -------- -------------- --------
- Set Reals[7] = 100.00
- -------- -------------- --------
- -------- Text Lifespan --------
- -------- -------------- --------
- Set Reals[8] = 2.30
- -------- -------------- --------
- -------- Text Fading Age --------
- -------- -------------- --------
- Set Reals[9] = 2.00
- -------- -------------- --------
- -------- Text Angle Velocity --------
- -------- -------------- --------
- Set Reals[10] = 90.00
- -------- -------------- --------
- -------- AoE --------
- -------- -------------- --------
- Set Reals[11] = 800.00
- -------- -------------- --------
- -------- Ability --------
- -------- -------------- --------
- Set Ability = Lame Joke
- -------- -------------- --------
- -------- Text Color --------
- -------- -------------- --------
- Set Strings[0] = |cffffcc00
- -------- -------------- --------
- -------- -------Initial Floating Text at the beginning of the spell------- --------
- -------- -------------- --------
- Set Strings[1] = (Strings[0] + Want to hear a joke?|r)
- -------- -------------- --------
- -------- Level 1 Joke --------
- -------- -------------- --------
- Set Strings[2] = (Strings[0] + An orc goes to the doctor's office and says: I'm feeling a bit GREEN!|r)
- -------- -------------- --------
- -------- Level 2 Joke --------
- -------- -------------- --------
- Set Strings[3] = (Strings[0] + How many Peasants does it take to screw in a lightbulb?|r)
- -------- -------------- --------
- -------- Level 3 Joke --------
- -------- -------------- --------
- Set Strings[4] = (Strings[0] + My Troll Impression|r)
- -------- -------------- --------
- -------- Level 4 Joke --------
- -------- -------------- --------
- Set Strings[5] = (Strings[0] + Airline Food. What's the deal with that?|r)
- -------- -------------- --------
- -------- Beginning of Joke --------
- -------- -------------- --------
- Set Sounds[1] = WarlordPissed1 <gen>
- -------- -------------- --------
- -------- Second Sound (What) --------
- -------- -------------- --------
- Set Sounds[2] = TichondriusWhat1 <gen>
- -------- -------------- --------
- -------- Joke 1 --------
- -------- -------------- --------
- Set Sounds[3] = GruntPissed7 <gen>
- -------- -------------- --------
- -------- Joke 2 --------
- -------- -------------- --------
- Set Sounds[4] = PeasantYes1 <gen>
- -------- -------------- --------
- -------- Joke 3 --------
- -------- -------------- --------
- Set Sounds[5] = ShadowHunterPissed8 <gen>
- -------- -------------- --------
- -------- Joke 4 --------
- -------- -------------- --------
- Set Sounds[6] = GyrocopterPissed8 <gen>
- -------- -------------- --------
-
Events
-
Lame Joke Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Ability
-
Actions
- -------- ////////////////////////////////////////////// --------
- -------- BEGIN WITH INDEXING --------
- -------- ////////////////////////////////////////////// --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Index[1] Equal to 0
-
Then - Actions
- Trigger - Turn on Lame Joke Loop <gen>
- Else - Actions
-
If - Conditions
- Set Index[1] = (Index[1] + 1)
- Set Index_Boolean = False
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Index_Integer Less than Index[2]
- Index_Clear[Index_Integer] Equal to True
- Index_Integer Not equal to 0
-
Then - Actions
- Set Index_Boolean = True
-
Else - Actions
-
For each (Integer Index[0]) from 1 to Index[2], do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Index_Boolean Equal to False
- Index_Clear[Index[0]] Equal to True
-
Then - Actions
- Set Index_Integer = Index[0]
- Set Index_Boolean = True
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Index_Boolean Equal to False
-
Then - Actions
- Set Index[2] = (Index[2] + 1)
- Set Index_Integer = Index[2]
- Else - Actions
-
If - Conditions
-
For each (Integer Index[0]) from 1 to Index[2], do (Actions)
-
If - Conditions
- Set Index_Clear[Index_Integer] = False
- -------- ////////////////////////////////////////////// --------
- -------- DONE INDEXING --------
- -------- ////////////////////////////////////////////// --------
- Set Caster[Index_Integer] = (Triggering unit)
- -------- ////////////////////////////////////////////// --------
- Set Loc[Index_Integer] = (Position of Caster[Index_Integer])
- -------- ////////////////////////////////////////////// --------
- Set Level[Index_Integer] = (Level of Ability for Caster[Index_Integer])
- -------- ////////////////////////////////////////////// --------
- Animation - Play Caster[Index_Integer]'s channel animation, using only Rare animations
- -------- ////////////////////////////////////////////// --------
- Set Still_Casting[Index_Integer] = True
- -------- ////////////////////////////////////////////// --------
- Set Counter[Index_Integer] = 0
- -------- ////////////////////////////////////////////// --------
- Set Damage[Index_Integer] = (Reals[4] x (Real(Level[Index_Integer])))
- -------- ////////////////////////////////////////////// --------
-
Events
-
Lame Joke Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer Index[3]) from 1 to Index[2], do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Still_Casting[Index[3]] Equal to True
-
Then - Actions
- Set Counter[Index[3]] = (Counter[Index[3]] + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Caster[Index[3]] is alive) Equal to False
-
Then - Actions
- Set Still_Casting[Index[3]] = False
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Counter[Index[3]] Equal to ((Integer(Reals[1])) x 33)
-
Then - Actions
- Floating Text - Create floating text that reads Strings[1] at Loc[Index[3]] with Z offset 0.00, using font size Reals[6], color (100.00%, 100.00%, 100.00%), and 0.00% transparency
- Set Temptext = (Last created floating text)
- Floating Text - Set the velocity of Temptext to Reals[7] towards Reals[10] degrees
- Floating Text - Change Temptext: Disable permanence
- Floating Text - Change the lifespan of Temptext to Reals[8] seconds
- Floating Text - Change the fading age of Temptext to Reals[9] seconds
- Custom script: set udg_Temptext = null
- Sound - Play Sounds[1] at 100.00% volume, located at Loc[Index[3]] with Z offset 0.00
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Counter[Index[3]] Equal to ((Integer(Reals[2])) x 33)
-
Then - Actions
- Sound - Play Sounds[2] at 100.00% volume, located at Loc[Index[3]] with Z offset 0.00
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Counter[Index[3]] Equal to ((Integer(Reals[5])) x 33)
-
Then - Actions
- Floating Text - Create floating text that reads Strings[(Level[Index[3]] + 1)] at Loc[Index[3]] with Z offset 0.00, using font size Reals[6], color (100.00%, 100.00%, 100.00%), and 0.00% transparency
- Set Temptext = (Last created floating text)
- Floating Text - Set the velocity of Temptext to Reals[7] towards Reals[10] degrees
- Floating Text - Change Temptext: Disable permanence
- Floating Text - Change the lifespan of Temptext to Reals[8] seconds
- Floating Text - Change the fading age of Temptext to Reals[9] seconds
- Custom script: set udg_Temptext = null
- Sound - Play Sounds[(Level[Index[3]] + 2)] at 100.00% volume, located at Loc[Index[3]] with Z offset 0.00
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Counter[Index[3]] Equal to (((Integer(Reals[5])) x 33) + 17)
-
Then - Actions
- Set RandomInteger[Index[3]] = (Random integer number between 1 and 100)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Real(RandomInteger[Index[3]])) Less than or equal to Reals[3]
-
Then - Actions
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within Reals[11] of Loc[Index[3]] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching player) is an enemy of (Owner of Caster[Index[3]])) Equal to True)))) and do (Actions)
-
Loop - Actions
- Unit - Add DummyAbilities to (Picked unit)
- Unit - Order (Picked unit) to Neutral - Firebolt Caster[Index[3]]
- Unit - Remove Tomato from (Picked unit)
-
Loop - Actions
-
Else - Actions
- Unit - Create 1 DummyType for (Owner of Caster[Index[3]]) at Loc[Index[3]] facing Default building facing degrees
- Set Dummy[Index[3]] = (Last created unit)
- Unit - Add a 0.30 second Generic expiration timer to Dummy[Index[3]]
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within Reals[11] of Loc[Index[3]] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching player) is an enemy of (Owner of Caster[Index[3]])) Equal to True)))) and do (Actions)
-
Loop - Actions
- Unit - Cause Caster[Index[3]] to damage (Picked unit), dealing Damage[Index[3]] damage of attack type Chaos and damage type Normal
- Unit - Order Dummy[Index[3]] to Undead Dreadlord - Sleep (Picked unit)
-
Loop - Actions
-
If - Conditions
- Custom script: call RemoveLocation(udg_Loc[udg_Index[3]])
- Set Still_Casting[Index[3]] = False
- -------- -------------------------------------------------------------------------------------------------------------------------------------------- --------
- Set Index[1] = (Index[1] - 1)
- Set Index_Clear[Index[3]] = True
- -------- -------------------------------------------------------------------------------------------------------------------------------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Index_Boolean Equal to False
-
Then - Actions
- Set Index_Integer = Index[3]
- Set Index_Boolean = True
- Else - Actions
-
If - Conditions
- -------- -------------------------------------------------------------------------------------------------------------------------------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Index[1] Not equal to 0
- Index[3] Equal to Index[2]
-
Then - Actions
- Set Index[2] = (Index[2] - 1)
- Else - Actions
-
If - Conditions
- -------- -------------------------------------------------------------------------------------------------------------------------------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Index[1] Equal to 0
-
Then - Actions
- Set Index[2] = 0
- Set Index_Integer = 0
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- -------- -------------------------------------------------------------------------------------------------------------------------------------------- --------
- Else - Actions
-
If - Conditions
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Index[1] Not equal to 0
- Index[3] Equal to Index[2]
-
Then - Actions
- Set Index[2] = (Index[2] - 1)
- 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)
-
Loop - Actions
-
For each (Integer Index[3]) from 1 to Index[2], do (Actions)
-
Events
If i don't fix it before April 1, i'll be disqualified