Hi guys I am currently trying to make a flame strike spell that spirals outwards when cast. I have managed to make it but everytime I cast the spell it seems to 1: Lag like mad. 2: Crash after casting the spell a few times (Memory could not be written error).
I think it might be a memory leak? Or perhaps too much things happening at a time? I would appreciate some help if anyone has any clues as to whats happening.
Here is the spell trigger:
I think it might be a memory leak? Or perhaps too much things happening at a time? I would appreciate some help if anyone has any clues as to whats happening.
Here is the spell trigger:
Trigger:
- Sprial Flame Strike
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Flame Strike
- Actions
- Custom script: local location udg_pointOfAbilityBeingCast
- Custom script: local unit udg_castingUnit
- Set pointOfAbilityBeingCast = (Target point of ability being cast)
- Set castingUnit = (Casting unit)
- For each (Integer A) from 1 to 36, do (Actions)
- Loop - Actions
- Unit - Create 1 dummy (Raven Form) for (Owner of (Triggering unit)) at pointOfAbilityBeingCast facing Default building facing degrees
- Unit - Add Flame Strike (Neutral Hostile) to (Last created unit)
- Unit - Order (Last created unit) to Human Blood Mage - Flame Strike (pointOfAbilityBeingCast offset by (0.00 + ((Real((Integer A))) x 9.00)) towards ((Real((Integer A))) x 15.00) degrees)
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- Loop - Actions
- Set pointOfAbilityBeingCast = (Center of (Playable map area))
- Set castingUnit = No unit
- Events