So I've been trying to use the Cycle integer action such as.
Math - Cycle Test 1-4
Even though the event is currently occurring it only cycles once so basically the test # is stuck at 1 in test and in multi player. (yeah I privately published and locked the map to make sure this was the case.) At this point I figured I'd look for the repeat actions trigger and made it to do.
- General - Repeat (Actions) forever
Actions
Math - Cycle test from 1 through 4
I was using this to try to force the # to keep cycling but instead whenever the even occurs now it says Trigger error in basically that function. "Execution took too long".
Does anyone know how to fix it or to make the trigger actually cycle the number more then once or is it just an editor bug?
Also the event to trigger it is a unit taking non fatal damage (Basically every time a unit attacks).
It's taking too long because that's an infinite loop. Could you state what you are trying to accomplish with this? Maybe there's a better way to go about it.
I'm using it as part of a critical strike trigger. There are 2 numbers that cycle one is 1 through 4 supposedly giving me a 25% chance to crit the the other is supposed to be the bonus damage that cycles 20 through 40 (oddly enough this one also goes to and stops at 1)
I can copy and paste the trigger as text if you want me to. i had brought this up in an earlier forum but I finally got the trigger to work partially correct other then the numbers not cycling properly.
I'm basically trying to emulate the wc3 critical strike ability. The random damage I don't care about that much but I would like it to have a random probability. So you're suggesting that maybe making it a random number of like 1-100 and saying if the number is <= 25 then to trigger?
Thanks that worked a lot better.
The variable now reads as
Critical test = (Random integer between 1 and 4) <Integer>
If anyone is looking for the same trigger or similar too it feel free to ask me and I'll give you the one I'm using.
So I've been trying to use the Cycle integer action such as.
Math - Cycle Test 1-4
Even though the event is currently occurring it only cycles once so basically the test # is stuck at 1 in test and in multi player. (yeah I privately published and locked the map to make sure this was the case.) At this point I figured I'd look for the repeat actions trigger and made it to do.
- General - Repeat (Actions) forever Actions Math - Cycle test from 1 through 4
I was using this to try to force the # to keep cycling but instead whenever the even occurs now it says Trigger error in basically that function. "Execution took too long".
Does anyone know how to fix it or to make the trigger actually cycle the number more then once or is it just an editor bug?
Also the event to trigger it is a unit taking non fatal damage (Basically every time a unit attacks).
It's taking too long because that's an infinite loop. Could you state what you are trying to accomplish with this? Maybe there's a better way to go about it.
I'm using it as part of a critical strike trigger. There are 2 numbers that cycle one is 1 through 4 supposedly giving me a 25% chance to crit the the other is supposed to be the bonus damage that cycles 20 through 40 (oddly enough this one also goes to and stops at 1)
I can copy and paste the trigger as text if you want me to. i had brought this up in an earlier forum but I finally got the trigger to work partially correct other then the numbers not cycling properly.
Could you not just use random numbers? Or are you specifically going for an "every fourth hit" or something?
I'm basically trying to emulate the wc3 critical strike ability. The random damage I don't care about that much but I would like it to have a random probability. So you're suggesting that maybe making it a random number of like 1-100 and saying if the number is <= 25 then to trigger?
Thanks that worked a lot better.
The variable now reads as
Critical test = (Random integer between 1 and 4) <Integer>
If anyone is looking for the same trigger or similar too it feel free to ask me and I'll give you the one I'm using.