- Joined
- Aug 23, 2011
- Messages
- 659
On that lines, I get error ''out of memory'' everytime when I cast spell. Can someone tell me how to fix it.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Trigger - Turn off (this trigger)
For each (Integer A) from 1 to 8, do (Actions)

...
Trigger - Turn on (this trigger)
Hm ... i did not get any errors.
At this map: the trigger was not activated --> it did nothing
When i activated it: There appeared some imale-waves going in the same direction every time the cryptlord casts his Impale.
And the skills are different: the trigger skill is a hero skill and the other one is a non-hero one --> no infinite loop
Are you using this skill in another map? if yes then the map causes some incompatibility (global variables?)
And still: the line "Set Caster = (Triggering unit)" is not necessary (or you change every following Triggering unit by using this variable.
Please stop ignoring us. The answer was posted long ago already...Edit: I tested, It crashed.
The solution literally is 1 line that took me 15 seconds to add...every dummy unit that casts the ability is triggering this trigger again causing an infinite loop which causes game to go BANG
Manaroth line spell

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Impale MANTEST


(Unit-type of (Triggering unit)) Not equal to dummy

Actions


Set Caster = (Triggering unit)


Set Real = 0.00


Set CasLoc = (Position of (Triggering unit))


For each (Integer A) from 1 to 8, do (Actions)



Loop - Actions




Unit - Create 1 dummy for (Owner of (Casting unit)) at CasLoc facing Default building facing degrees




Unit - Turn collision for (Last created unit) Off




Unit - Add Impale MANTEST to (Last created unit)




Set LocOffset[(Integer A)] = (CasLoc offset by 700.00 towards Real degrees)




Unit - Order (Last created unit) to Undead Crypt Lord - Impale LocOffset[(Integer A)]




Set Real = (Real + (360.00 / 8.00))




Unit - Add a 1.00 second Generic expiration timer to (Last created unit)




Custom script: call RemoveLocation(udg_LocOffset[bj_forLoopAIndex])


Custom script: call RemoveLocation(udg_CasLoc)
Please stop ignoring us. The answer was posted long ago already...
The solution literally is 1 line that took me 15 seconds to add...
It cannot infinite loop because it now rejects all executions caused by the dummies casting the same spell as the actual unit.
Manaroth line spell
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Impale MANTEST
(Unit-type of (Triggering unit)) Not equal to dummy
Actions
Set Caster = (Triggering unit)
Set Real = 0.00
Set CasLoc = (Position of (Triggering unit))
For each (Integer A) from 1 to 8, do (Actions)
Loop - Actions
Unit - Create 1 dummy for (Owner of (Casting unit)) at CasLoc facing Default building facing degrees
Unit - Turn collision for (Last created unit) Off
Unit - Add Impale MANTEST to (Last created unit)
Set LocOffset[(Integer A)] = (CasLoc offset by 700.00 towards Real degrees)
Unit - Order (Last created unit) to Undead Crypt Lord - Impale LocOffset[(Integer A)]
Set Real = (Real + (360.00 / 8.00))
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Custom script: call RemoveLocation(udg_LocOffset[bj_forLoopAIndex])
Custom script: call RemoveLocation(udg_CasLoc)
