Yes, It doesn't need variable. But
set bj_wantDestroyGroup = true
is unsafe and drop fps faster than
call DestroyGroup()
. You can test it by yourself.
----
@BUP: If you use variables array, you need to limit array size of those variables.
-
spr Config
-
Events
-
Conditions
-
Actions
-
Set global_interval = 0.03
-
Trigger - Add to spr Loop <gen> the event (Time - Every global_interval seconds of game time)
If you use this way, you should use timer instead of the trigger timer because timer faster than trigger timer.
-
Animation - Change spr_dummy[spr_current_index]'s size to (spr_dummy_size[spr_level[spr_current_index]]%, spr_dummy_size[spr_level[spr_current_index]]%, spr_dummy_size[spr_level[spr_current_index]]%) of its original size
=>
-
Animation - Change spr_dummy[spr_current_index]'s size to (spr_dummy_size[spr_level[spr_current_index]]%, 0.00%, 0.00%) of its original size
Fix this:
-
spr Loop
-
Events
-
Conditions
-
Actions
-
For each (Integer spr_loop) from 0 to (spr_index_listener (- 1 ??????)), do (Actions)
Saves
udg_spr_angle[udg_spr_current_index] * bj_DEGTORAD
udg_spr_speed[udg_spr_level[udg_spr_current_index]] * Cos(constantVar)
udg_spr_speed[udg_spr_level[udg_spr_current_index]] * Sin(constantVar)
into variable since they are constant variables.
You leak this location I guess since you forgoted to cleaned the first location.
-
For each (Integer spr_loop) from 0 to (spr_index_listener - 1), do (Actions)
-
Loop - Actions
-
Set spr_current_index = spr_index_container[spr_loop]
-
-------- ---------INDEXING ENDS---------- --------
-
Set spr_dummy_point[spr_current_index] = (Position of spr_dummy[spr_current_index])
-
Set spr_distance[spr_current_index] = (Distance between spr_caster_point[spr_current_index] and spr_dummy_point[spr_current_index])
-
Else - Actions
-
Set spr_dummy_point[spr_current_index] = (Position of spr_dummy[spr_current_index])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
spr_timer[spr_current_index] Greater than 0.00
-
Then - Actions
-
Set spr_timer[spr_current_index] = (spr_timer[spr_current_index] - global_interval)
-
Else - Actions
-
Set spr_timer[spr_current_index] = spr_Howl_Interval
-
Special Effect - Create a special effect at spr_dummy_point[spr_current_index] using spr_effect_model[1]
-
Special Effect - Destroy (Last created special effect)
In my memory leaks checker, you've leaked location and group 0.0...
And as pOke said too ^_^..