(11-01-2012, 04:03 PM)ZodiaC Wrote: (11-01-2012, 02:42 PM)The chaser Wrote: I know about Angel, but NOTHING of C++. Sorry
Just an example in Angel script, please.
Ok I tried the "do" and the "while" commands with angle script and they worked perfectly
so I will try to explain them but I promise nothing..
Anyway the "do" command is executed at least one time and it syntax is this:
SetLocalVarInt("number", 0);
do
{
//All your commands goes here
AddLocalVarInt("number", 1); //It's necessary to change the number cause if you don't it will loop for ever
while (GetLocalVarInt("number") > 3) //this is where it checks .. if the number is less or equal to 3 the proccess will loop(goto "do") and check again...If the number is equal or bigger than 3 the loop will stop
That's the "do" command
The "while" commands it's the exact opposite of the "do" command!
It's checks in the begining and then loops
syntax:
SetLocalVarInt("number", 0);
while (GetLocalVarInt("number") <= 3) //This is where it checks..If it's less OR equal to 3 the loop will continue(or start) and come back here...
{
//All your commands goes here
AddLocalVarInt("number", 1); //It's necessary to change the number cause if you don't it will loop for ever
} //From here it goes to "while" command (goto while).
So if you look carefully you will notice that both of the commands are doing the exact same thing in this example...
they are ussualy used for searching arrays value.They should work exactly like in C++.
Anyway I hope you understood how they work...
I think I understood it. But, I will give it a more deep look after. Thanks for sharing them