- Joined
- Apr 19, 2011
- Messages
- 1,331
So, i have a problem with one my old spells, used in one of my maps. This spell create very big lags when used in game and sometimes, war3 crashes cauz' of this (not a fatal error, just like if you press alt + f4 in a program) and that for all players.
So here are the spell triggers :
So i don't understand what's the problem.
So here are the spell triggers :
-
Coup Sanglant
-
Evénements
- Unité - A unit Initie l'effet d'une compétence
-
Conditions
- (Ability being cast) Egal Ã* Coup Sanglant
-
Actions
- Set CS_cible = (Target unit of ability being cast)
- Set CS_loop_times = 0
- Set CS_heros = (Casting unit)
- Set CS_Point_KB_fin = ((Position of CS_cible) offset by 200.00 towards (Angle from (Position of CS_heros) to (Position of CS_cible)) degrees)
- Déclencheur - Turn on Coup Sanglant Loop <gen>
-
Evénements
-
Coup Sanglant Loop
-
Evénements
- Temps - Every 0.03 seconds of game time
- Conditions
-
Actions
- Set CS_loc_cible = (Position of CS_cible)
- Set CS_angle = (Angle from CS_loc_cible to CS_Point_KB_fin)
- Set CS_loop_times = (CS_loop_times + 1)
- Set CS_loc_cible_new = (CS_loc_cible offset by 6.00 towards CS_angle degrees)
- Unité - Move CS_cible instantly to CS_loc_cible_new, facing (Facing of CS_cible) degrees
- Custom script: call RemoveLocation( udg_CS_loc_cible_new )
- Custom script: call RemoveLocation( udg_CS_loc_cible )
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Si - Conditions
- CS_loop_times Supérieur ou égal Ã* 25
-
Alors - Actions
- Custom script: call RemoveLocation( udg_CS_Point_KB_fin )
- Déclencheur - Turn off (This trigger)
- Sinon - Actions
-
Si - Conditions
-
Evénements
So i don't understand what's the problem.