- Joined
- Apr 7, 2009
- Messages
- 241
Im trying to use the Power Slam spell from -BerZeKeR-'s Simple Spell Pack v1,2d. I imported it into my map and it worked perfectly (coming to the problem soon). It's a spell that deals damage based on strength to a single enemy target. Here's what the original trigger looks like (there's only one trigger, no JASS):
Since I suck with GUI (and jass) I couldnt do it myself so I sent a message to the maker of the spell and he told me to replace
Line 159: Type mismatch in assignment
Line 159: set udg_Power_Slam_Damage_Multiplier = ( ( 0.10 * I2R(GetUnitAbilityLevelSwapped('A01E', udg_Power_Slam_Caster)) ) + 1 )
I told the maker of the spell that helped me about this error and he didnt have a clue of what's wrong so now I am turning to everybody at this forum instead. Please help me
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Power Slam
-
-
Actions
-
-------- ------------------------------------------------------------------------------------------------- --------
-
-------- Getting the Spell constants --------
-
-------- ------------------------------------------------------------------------------------------------- --------
-
Set Power_Slam_Caster = (Triggering unit)
-
Set Power_Slam_Target = (Target unit of ability being cast)
-
Set Power_Slam_Location = (Position of Power_Slam_Target)
-
Set Power_Slam_Owner = (Owner of Power_Slam_Caster)
-
Set Power_Slam_Ability_Level = (Level of (Ability being cast) for Power_Slam_Caster)
-
-------- ------------------------------------------------------------------------------------------------- --------
-
-------- Setting the Spell values --------
-
-------- ------------------------------------------------------------------------------------------------- --------
-
Set Power_Slam_Strength = (Strength of Power_Slam_Caster (Include bonuses))
-
Set Power_Slam_Damage_Multiplier = (2 x Power_Slam_Ability_Level)
-
Set Power_Slam_Damage = ((Real(Power_Slam_Strength)) x (Real(Power_Slam_Damage_Multiplier)))
-
Set Power_Slam_Base_Chance = 15.00
-
Set Power_Slam_Total_Chance = (Power_Slam_Base_Chance x (Real(Power_Slam_Ability_Level)))
-
Set Power_Slam_Dummy_Ability = Power Slam(dummy)
-
-------- ------------------------------------------------------------------------------------------------- --------
-
-------- Damaging the Target --------
-
-------- ------------------------------------------------------------------------------------------------- --------
-
Unit - Cause Power_Slam_Caster to damage Power_Slam_Target, dealing Power_Slam_Damage damage of attack type Spells and damage type Unknown
-
-------- ------------------------------------------------------------------------------------------------- --------
-
-------- Creating nice special effect --------
-
-------- ------------------------------------------------------------------------------------------------- --------
-
Special Effect - Create a special effect at Power_Slam_Location using Abilities\Weapons\Bolt\BoltImpact.mdl
-
Special Effect - Destroy (Last created special effect)
-
Special Effect - Create a special effect at Power_Slam_Location using Abilities\Spells\Human\StormBolt\StormBoltMissile.mdl
-
Special Effect - Destroy (Last created special effect)
-
-------- ------------------------------------------------------------------------------------------------- --------
-
-------- Giving a chance to trigger the bonus actions --------
-
-------- ------------------------------------------------------------------------------------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Random real number between 1.00 and 100.00) Less than or equal to Power_Slam_Total_Chance
-
-
Then - Actions
-
-------- ------------------------------------------------------------------------------------------------- --------
-
-------- Setting the Dummy, ordering it to cast a spell --------
-
-------- ------------------------------------------------------------------------------------------------- --------
-
Unit - Create 1 Dummy for Power_Slam_Owner at Power_Slam_Location facing Default building facing degrees
-
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
-
Unit - Add Power_Slam_Dummy_Ability to (Last created unit)
-
Unit - Set level of Power_Slam_Dummy_Ability for (Last created unit) to Power_Slam_Ability_Level
-
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt Power_Slam_Target
-
-------- ------------------------------------------------------------------------------------------------- --------
-
-------- Creating nice special effect --------
-
-------- ------------------------------------------------------------------------------------------------- --------
-
Special Effect - Create a special effect at Power_Slam_Location using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
-
Special Effect - Destroy (Last created special effect)
-
-------- ------------------------------------------------------------------------------------------------- --------
-
-
Else - Actions
-
-
-------- ------------------------------------------------------------------------------------------------- --------
-
-------- Creating and setting floating text --------
-
-------- ------------------------------------------------------------------------------------------------- --------
-
Floating Text - Create floating text that reads ((String((Integer(Power_Slam_Damage)))) + !) above Power_Slam_Target with Z offset 0.00, using font size 10.00, color (0.00%, 40.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 64.00 towards 90.00 degrees
-
Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
-
Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
-
-------- ------------------------------------------------------------------------------------------------- --------
-
-------- Clearing Leaks --------
-
-------- ------------------------------------------------------------------------------------------------- --------
-
Custom script: call RemoveLocation(udg_Power_Slam_Location)
-
Since I suck with GUI (and jass) I couldnt do it myself so I sent a message to the maker of the spell and he told me to replace
-
Set Power_Slam_Damage_Multiplier = (2 x Power_Slam_Ability_Level)
-
Set Power_Slam_Damage_Multiplier = ((0.10 x (Real((Level of Power Slam for Power_Slam_Caster)))) + 1.00)
Line 159: Type mismatch in assignment
Line 159: set udg_Power_Slam_Damage_Multiplier = ( ( 0.10 * I2R(GetUnitAbilityLevelSwapped('A01E', udg_Power_Slam_Caster)) ) + 1 )
I told the maker of the spell that helped me about this error and he didnt have a clue of what's wrong so now I am turning to everybody at this forum instead. Please help me
