In one of my spells the trigger code is too long, probably because of my many if,then functions. I know I could probably rewrite this with an array, but im not that good with them, could anyone take a look at my spell and help me how to change the code on this spell in particular?
EDIT: It's the spell called "Cider"
EDIT 2: The spell creates a dummy-unit which a region is added to, all enemy units in that region gets paused for 1 sec. The "stun" is repeated 3 times and more on higher levels.
Yes it works now because i deleted Level 5 of it in the trigger editor. If i put level 5 of it in the editor and try to save, the editor says its too long. Which means the map dont get saved.. :/
The majority of your trigger looks like you copied and pasted it over and over, which could be handled better by some kind of loop. Use pick each integer statement to loop this stuff.
Kinda like this:
pick each integer from 1 to 4
actions -> Do a bunch of crazy stuff and wait 1 second
Also, could you please provide a general description of what this is suppsoed to do? Starting from scratch might be easier than starting from the broken version.
Lol i love you, the trigger is now short as a goldfish in a bowl, ty!
Edit: For your question. The spell creates a dummy unit, attaches a region to it, kills the dummy unit, and pauses all units in the region for 1 sec. Then repeats.
In one of my spells the trigger code is too long, probably because of my many if,then functions. I know I could probably rewrite this with an array, but im not that good with them, could anyone take a look at my spell and help me how to change the code on this spell in particular?
EDIT: It's the spell called "Cider"
EDIT 2: The spell creates a dummy-unit which a region is added to, all enemy units in that region gets paused for 1 sec. The "stun" is repeated 3 times and more on higher levels.
Sure
What's the spell supposed to do, and whats wrong with it now?
Spell works fine for me.
@SquarelyCircle: Go
Believe me when I say you don't want him to paste the trigger in here :P
Yes it works now because i deleted Level 5 of it in the trigger editor. If i put level 5 of it in the editor and try to save, the editor says its too long. Which means the map dont get saved.. :/
@sonnert: Go
Ok, first thing:
The majority of your trigger looks like you copied and pasted it over and over, which could be handled better by some kind of loop. Use pick each integer statement to loop this stuff.
Kinda like this:
pick each integer from 1 to 4
actions -> Do a bunch of crazy stuff and wait 1 second
@SquarelyCircle: Go
Also, could you please provide a general description of what this is suppsoed to do? Starting from scratch might be easier than starting from the broken version.
@SquarelyCircle: Go
Lol i love you, the trigger is now short as a goldfish in a bowl, ty!
Edit: For your question. The spell creates a dummy unit, attaches a region to it, kills the dummy unit, and pauses all units in the region for 1 sec. Then repeats.
@sonnert: Go
lol. You crack me up, buddy :)