So,Im working on my map and I want to make a trigger like this:When jim raynor use a ability, he got 25% chance to reset all is cooldown ability and gain 60 energie.
Ok,Im like beginner in this editor so I do not understand what can I do I try but there is some missing info.You give me 1 event,2 action,1 condition and 2 other action.Its make me lost.Can I see a picture or more explanation on all those triggers?
Ok nice, the if then else action how do I put 'local variable'=1. I only have, and,comparison,not,or,within a bound,text as been set.witch one I chose?
Ok I finish.The cool down doesnt work for random reason and to energy work.For the energy I want to add not to set and I never find add (something) on the trigger list.
ok I din not found the function (Arithmetic) and this is look like with only 1/4chance to reset ability and I dont know where can I put the add+60 energy if the reset cooldown work.
I'll even add a bit more explanation to it. Using "random integer" in the triggers condition is not optimal at all. Once the value is set to a value between 1 and 4, it won't be changed again. Chances are it will even be set to 0 by default, if "random integer" is not valid (I'm not sure, but I think conditions are not able to take "decisions" like that. It just checks values, it won't set them).
So basically, do as Trieva said, and remove the condition which is not relevant anymore. To sum this up:
Set value = random integer between 1 and 4
If value == 1 then apply both effects
else nothing
Now, each time your character will use its ability (and the process finishes), it will have 25% chances of applying the designated effects.
The trigger in the pic isn't quite correct yet. The Variable - Set carl line should be above the If then else action. You also need to set that variable to a random number between 1 and 4.
EDIT: Doing this will create that 'chance' effect that you need.
Hes setting the random variable correctly at the variable declare section. This is fine. Keep in mind .... random in triggers doesnt seem to be all that random........ you may wanna do ... int = rand 1 though 100 and then check to see if its <= 25 . .... you may see better random results....
SouLCarveRR : "random in triggers doesnt seem to be all that random"
Really? I would think Blizzard would use a robust and fast random number generator like the Mersenne Twister, without any kind of bias and an astronomical period.
Anyone feel like running some statistical analysis on the Galaxy rand()? :)
Anyone feel like running some statistical analysis on the Galaxy rand()? :)
When I select "random race" in melee, I end up with the Zerg race 75% of the time. I can't tell if their algorithm is the same with custom triggers using random calculations, but I find this kind of self-explanatory...
As far as I can tell though, using a range from 1 to 4 or a range from 1 to 100 gives pretty much the same result. I usually use percentage only for convenience.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
So,Im working on my map and I want to make a trigger like this:When jim raynor use a ability, he got 25% chance to reset all is cooldown ability and gain 60 energie.
Please help, Any idea how can I make that?
THX
Ok,Im like beginner in this editor so I do not understand what can I do I try but there is some missing info.You give me 1 event,2 action,1 condition and 2 other action.Its make me lost.Can I see a picture or more explanation on all those triggers?
Ok nice, the if then else action how do I put 'local variable'=1. I only have, and,comparison,not,or,within a bound,text as been set.witch one I chose?
Ok I finish.The cool down doesnt work for random reason and to energy work.For the energy I want to add not to set and I never find add (something) on the trigger list.
ok I din not found the function (Arithmetic) and this is look like with only 1/4chance to reset ability and I dont know where can I put the add+60 energy if the reset cooldown work.
@Trieva: Go
Trieva: The guy with a patience hat so tall he has trouble ducking through doorways :)
MADE IT!!! THX!!! Look how is the trigger on the pic.
@Trieva: Go
I'll even add a bit more explanation to it. Using "random integer" in the triggers condition is not optimal at all. Once the value is set to a value between 1 and 4, it won't be changed again. Chances are it will even be set to 0 by default, if "random integer" is not valid (I'm not sure, but I think conditions are not able to take "decisions" like that. It just checks values, it won't set them).
So basically, do as Trieva said, and remove the condition which is not relevant anymore. To sum this up:
Set value = random integer between 1 and 4
If value == 1 then apply both effects
else nothing
Now, each time your character will use its ability (and the process finishes), it will have 25% chances of applying the designated effects.
Hes setting the random variable correctly at the variable declare section. This is fine. Keep in mind .... random in triggers doesnt seem to be all that random........ you may wanna do ... int = rand 1 though 100 and then check to see if its <= 25 . .... you may see better random results....
ok thx! Anyway for me its work well.
SouLCarveRR : "random in triggers doesnt seem to be all that random"
Really? I would think Blizzard would use a robust and fast random number generator like the Mersenne Twister, without any kind of bias and an astronomical period.
Anyone feel like running some statistical analysis on the Galaxy rand()? :)
When I select "random race" in melee, I end up with the Zerg race 75% of the time. I can't tell if their algorithm is the same with custom triggers using random calculations, but I find this kind of self-explanatory...
As far as I can tell though, using a range from 1 to 4 or a range from 1 to 100 gives pretty much the same result. I usually use percentage only for convenience.