- Joined
- Aug 14, 2006
- Messages
- 7,602
Hello.
I got a big problem I've been trying to fix last few weeks without any results. It's about spells. I made a spell book system when the player clicks a dummy hero player's selection will be moved to another dummy unit(building) that has some "spell book spells".
The spells have 99999 range. All spells bugs, even if the coding should be alright.
1) Spells that are casted to X point are always put to the middle
2) Spells that are casted to units to friendly and enemy units... Just doesn't work(no effect, no damage, no healing)
Most of the abilities are made of Channel spell.
Here's for example spell "Volcanic Fissure". Currently when player cast it to anywhere it always happen in the middle of map.
And here's another example spell Fire Ward. When it's cast on a unit it doesn't do anything.
Ask more, I'm eager to solve this bug.
Rep and credits for the helpers.
I got a big problem I've been trying to fix last few weeks without any results. It's about spells. I made a spell book system when the player clicks a dummy hero player's selection will be moved to another dummy unit(building) that has some "spell book spells".
The spells have 99999 range. All spells bugs, even if the coding should be alright.
1) Spells that are casted to X point are always put to the middle
2) Spells that are casted to units to friendly and enemy units... Just doesn't work(no effect, no damage, no healing)
Most of the abilities are made of Channel spell.
Here's for example spell "Volcanic Fissure". Currently when player cast it to anywhere it always happen in the middle of map.
-
Volcanic Fissure
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to 1Volcanic Fissure (Fire 2)
-
Actions
- Trigger - Turn off (This trigger)
- Game - Display to (All players) the text: volcanic
- Set TempLoc = (Target point of ability being cast)
- Unit - Create 1 Volcanic Fissure Dummy for Neutral Passive at TempLoc facing Default building facing degrees
- Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
- Set VolcanicFissure_Unit = (Last created unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of SPELL_SpellBook[2] for Restore_Panel[6]) Equal to 3
-
Then - Actions
- Animation - Change VolcanicFissure_Unit's size to (125.00%, 125.00%, 125.00%) of its original size
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation(udg_TempLoc)
- Wait 0.50 seconds
- Set TempLoc = (Position of VolcanicFissure_Unit)
- Set TempGroup2 = (Units owned by Neutral Hostile)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of SPELL_SpellBook[2] for Restore_Panel[6]) Equal to 3
-
Then - Actions
-
Unit Group - Pick every unit in TempGroup and do (Actions)
-
Loop - Actions
- Set TempGroup = (Units within 450.00 of TempLoc matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is in TempGroup2) Equal to True) and ((Level of Invulnerable (Neutral) for (Matching unit)) Equal to 0))))
- Unit - Create 1 Ability Dummy Unit for Player 1 (Red) at TempLoc facing Default building facing degrees
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
- Unit - Set level of STUN (0,5 sec / lvl DUMMY STUN) for (Last created unit) to 12
- Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
- Unit - Create 1 Ability Dummy Unit 3 for Neutral Passive at TempLoc facing TempLoc
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
- Unit - Set level of AAAStagger for (Last created unit) to 6
- Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Drunken Haze (Picked unit)
- Unit - Cause AAAPhodom to damage (Picked unit), dealing ((Real(YMultiboard__VOLCANO)) + 1.50) damage of attack type Spells and damage type Normal
- Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\Volcano\VolcanoDeath.mdl
- Special Effect - Destroy (Last created special effect)
-
Loop - Actions
-
Unit Group - Pick every unit in TempGroup and do (Actions)
-
Else - Actions
-
Unit Group - Pick every unit in TempGroup and do (Actions)
-
Loop - Actions
- Set TempGroup = (Units within 300.00 of TempLoc matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is in TempGroup2) Equal to True) and ((Level of Invulnerable (Neutral) for (Matching unit)) Equal to 0))))
- Unit - Create 1 Ability Dummy Unit for Player 1 (Red) at TempLoc facing Default building facing degrees
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
- Unit - Set level of STUN (0,5 sec / lvl DUMMY STUN) for (Last created unit) to 8
- Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
- Unit - Create 1 Ability Dummy Unit 3 for Neutral Passive at TempLoc facing TempLoc
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
- Unit - Set level of AAAStagger for (Last created unit) to 4
- Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Drunken Haze (Picked unit)
- Unit - Cause AAAPhodom to damage (Picked unit), dealing (Real(YMultiboard__VOLCANO)) damage of attack type Spells and damage type Normal
- Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\Volcano\VolcanoDeath.mdl
- Special Effect - Destroy (Last created special effect)
-
Loop - Actions
-
Unit Group - Pick every unit in TempGroup and do (Actions)
-
If - Conditions
- Custom script: call DestroyGroup(udg_TempGroup2)
- Custom script: call DestroyGroup(udg_TempGroup)
- Custom script: call RemoveLocation(udg_TempLoc)
- Set VolcanicFissure_Unit = No unit
- Trigger - Turn on (This trigger)
-
Events
And here's another example spell Fire Ward. When it's cast on a unit it doesn't do anything.
-
Fire Ward
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to 1Fire Ward (Fire 1)
-
Actions
- Trigger - Turn off (This trigger)
- Game - Display to (All players) the text: fire ward
- Set TempLoc = (Position of (Target unit of ability being cast))
- Set Holy_Sign_Unit = (Target unit of ability being cast)
- Unit - Create 1 Holy Sign Dummy for Neutral Passive at TempLoc facing Default building facing degrees
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- Unit - Remove Negative buffs from Holy_Sign_Unit
- Custom script: call RemoveLocation(udg_TempLoc)
- Special Effect - Create a special effect attached to the origin of Holy_Sign_Unit using war3mapImported\LightStrikeArray.mdx
- Special Effect - Destroy (Last created special effect)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of SPELL_SpellBook[1] for Restore_Panel[6]) Equal to 1
-
Then - Actions
-
For each (Integer Flame_Thrower_Integer) from 1 to 5, do (Actions)
-
Loop - Actions
- Unit - Set life of Holy_Sign_Unit to ((Life of Holy_Sign_Unit) + (Real(YMultiboard__DIVINESHIELD)))
- Wait 1.00 seconds
-
Loop - Actions
-
For each (Integer Flame_Thrower_Integer) from 1 to 5, do (Actions)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of SPELL_SpellBook[1] for Restore_Panel[6]) Equal to 2
-
Then - Actions
-
For each (Integer Flame_Thrower_Integer) from 1 to 10, do (Actions)
-
Loop - Actions
- Unit - Set life of Holy_Sign_Unit to ((Life of Holy_Sign_Unit) + (Real(YMultiboard__DIVINESHIELD)))
- Wait 1.00 seconds
-
Loop - Actions
-
For each (Integer Flame_Thrower_Integer) from 1 to 10, do (Actions)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of SPELL_SpellBook[1] for Restore_Panel[6]) Equal to 3
-
Then - Actions
-
For each (Integer Flame_Thrower_Integer) from 1 to 5, do (Actions)
-
Loop - Actions
- Unit - Set life of Holy_Sign_Unit to ((Life of Holy_Sign_Unit) + ((Real(YMultiboard__DIVINESHIELD)) x 10.00))
- Unit - Set life of Holy_Sign_Unit to ((Life of Holy_Sign_Unit) + (Real(YMultiboard__DIVINESHIELD)))
- Wait 1.00 seconds
-
Loop - Actions
-
For each (Integer Flame_Thrower_Integer) from 1 to 5, do (Actions)
- 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
- Set Holy_Sign_Unit = No unit
- Trigger - Turn on (This trigger)
-
Events
Rep and credits for the helpers.