- Joined
- Sep 6, 2015
- Messages
- 576
As the title says, I want each trigger execution to perform in a different variable, and not to overwrite the variable which is set in it. This question bothered me for quite a some time now.
Because the integer value cannot have partial numbers, only whole, so I left out that "-.04".Set SleepDuration[TempInteger] = SleepDuration[TempInteger] - .04
It will not work because the SleepDuration will never get to 0 value. You may need to change that integer variable to a real variable so you can decrease it based on an interval.
I had changed that real variable to integer because "Level of Sleep for Triggering Unit" couldn't be used with a real variable. Now I added the ability level condition in front of everything and changed it to real and it works fine. Here are the complete triggers:Set SleepDuration[Counter] = 20. * Level of Sleep for Triggering Unit (Real Variable)
What do you mean with that OR condition? Where to add it and what exactly to add?You also need to make the condition 'OR' statement together with the duration and if the target dies.
Ok, thanks. Here are the final triggers:No, nesting the condition for the level is not the solution so remove that if's statements in the trigger 1.
All you have to do is to find the GUI function inside the parameter of that real variable;
( Conversion - Integer to Real ) or known as I2R.
( It seems pOke forgot to include that conversion )
then you can now freely put an integer value
( level ) into that real variable.
So it should look like:
Set SleepDuration[counter] = ( 20 x (Integer(Level of Ability from triggering unit)))
Put the 'Or' statement here together with the checking if sleep unit is dead.
Or - ( Multiple Conditions ) SleepDuration[TempInteger] Less than or equal to 0.00 ( SleepUnit[TempInteger] is dead ) Equal to true
^ Unit is dead can be found on a boolean condition.
Remember to put them inside the 'Or' statement or else it will considered the statement as 'And' thus returning the statement to false if both statement don't agree from each other.
I checked that already, I will try it if I will be making any such spells.If you're interested in further;
http://www.hiveworkshop.com/pastebin/bb36a403d199a9674f100c0b7bf81eff7063/
I don't know anything about them. How to use them, how do they function and how would they fit these triggers?You could try using local variables. They are unique for each function call but stop existing on function return.
They are only available with JASS. They function like local variables in other programming languages. The only major difference is that local declared local handle variables need to be nulled before function return due to a bug resulting in a reference counter reference leak.I don't know anything about them. How to use them, how do they function and how would they fit these triggers?