- Joined
- Nov 14, 2008
- Messages
- 3,256
Heya
Well have been busy workin' on a map with my team for a time now. As I'm making some spells for some heroes and some systems I thought this would be easy as a piece of cake.
But now I suffered a big problem. I'm makin some kind of shadow stomp thing. And when I cast it when no units are near, the spell and special effects work. But when I stand close to some units the spell f*cks up (sorry for my language) . It wont work so now I'm asking you to help me. Thought there shouldnt be any leaks but tell me if you find some.
Using Paladons KB System, credits for that.
The spell arent supposed to be mpi nor mui so dont worry about that.
And the loop
edit: attached the test map, it's big because of a skin we're using in my teams map, credits to Black_Stan for that skin
regards
baassee
Well have been busy workin' on a map with my team for a time now. As I'm making some spells for some heroes and some systems I thought this would be easy as a piece of cake.
But now I suffered a big problem. I'm makin some kind of shadow stomp thing. And when I cast it when no units are near, the spell and special effects work. But when I stand close to some units the spell f*cks up (sorry for my language) . It wont work so now I'm asking you to help me. Thought there shouldnt be any leaks but tell me if you find some.
Using Paladons KB System, credits for that.
The spell arent supposed to be mpi nor mui so dont worry about that.
-
SOC Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Stomp Of Corruption
-
Actions
- Set SOC_Caster = (Triggering unit)
- Set SOC_CasterPoint = (Position of (Triggering unit))
- Set SOC_Integer = 0
- Set SOC_IntegerEnd = 15
- Set SOC_AngleInteger = 0
-
For each (Integer A) from 1 to 32, do (Actions)
-
Loop - Actions
- Set SOC_AngleInteger = (SOC_AngleInteger + 1)
- Set SOC_Angle[(Integer A)] = (11.25 x (Real(SOC_AngleInteger)))
-
Loop - Actions
- Trigger - Turn on SOC Loop <gen>
-
Events
-
SOC Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
- Set SOC_Integer = (SOC_Integer + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SOC_Integer Not equal to SOC_IntegerEnd
-
Then - Actions
-
For each (Integer A) from 1 to 32, do (Actions)
-
Loop - Actions
- Set SOC_TempPoint = (SOC_CasterPoint offset by (50.00 x (Real(SOC_Integer))) towards SOC_Angle[(Integer A)] degrees)
- Set SOC_TempGroup = (Units within 100.00 of SOC_TempPoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of SO
- Special Effect - Create a special effect at SOC_TempPoint using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
- Special Effect - Destroy (Last created special effect)
-
Unit Group - Pick every unit in SOC_TempGroup and do (Actions)
-
Loop - Actions
- Unit - Create 1 Dummy for (Owner of SOC_Caster) at SOC_TempPoint facing Default building facing degrees
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
- Unit - Add SOC Armor Dummy to (Last created unit)
- Unit - Set level of SOC Armor Dummy for (Last created unit) to (Level of Stomp Of Corruption for SOC_Caster)
- Unit - Order (Last created unit) to Attack (Picked unit)
- Unit - Cause SOC_Caster to damage (Picked unit), dealing (1.20 x (Real((Strength of SOC_Caster (Exclude bonuses))))) damage of attack type Spells and damage type Normal
- -------- This is the caster of the knockback. --------
- -------- If you use spells, it´s mostly the 'triggering unit' or the 'casting unit'. --------
- Set KBA_Caster = SOC_Caster
- -------- --------
- -------- This is the unit knocked back. Set this variable to the unit which should receive the knockback. --------
- -------- Use for example 'Target unit of ability being cast' or 'picked unit', 'attacking unit', 'casting unit', 'triggering unit' or whatever. --------
- Set KBA_TargetUnit = (Picked unit)
- -------- --------
- -------- This is the location from where the unit should be knocked back. --------
- -------- Don´t set this location to the position of the unit which should be knocked back. --------
- Set KBA_StartingPosition = SOC_CasterPoint
- -------- --------
- -------- This saves the level of the spell. --------
- -------- If the level shouldn´t influence the knockback, set the variable to 1. --------
- Set KBA_Level = (Level of Stomp Of Corruption for SOC_Caster)
- -------- --------
- -------- This determines the speed of the knockback. --------
- -------- If you set the speed to 0, the unit won´t move. --------
- Set KBA_Speed = 7.00
- -------- --------
- -------- This determines the distance knockbacked per level of the spell. --------
- -------- If the level shouldn´t influence the knockback, simply set this variable to the distance you wish. --------
- Set KBA_DistancePerLevel = 100.00
- -------- --------
- -------- The following both variables store the path of the effects used. --------
- -------- Effect[1] is more often used than Effect[2]. --------
- Set KBA_SpecialEffects[1] = Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
- Set KBA_SpecialEffects[2] = Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
- -------- --------
- -------- Set the following variable to 'false' to allow trees to survive a collision with a knocked unit. --------
- -------- Set the following variable to 'true' to kill trees upon collision with a knocked unit. --------
- Set KBA_DestroyTrees = True
- -------- --------
- -------- After setting the needed variables we start the knockback. --------
- Trigger - Run Cast A Knockback <gen> (checking conditions)
- -------- Done. The unit knockbacked if the trigger triggers. --------
- Custom script: call DestroyGroup (udg_SOC_TempGroup)
-
Loop - Actions
-
Loop - Actions
- Custom script: call RemoveLocation (udg_SOC_TempPoint)
-
For each (Integer A) from 1 to 32, do (Actions)
-
Else - Actions
- Custom script: call RemoveLocation (udg_SOC_CasterPoint)
- Trigger - Turn off (This trigger)
-
If - Conditions
-
Events
regards
baassee