Posted By: jumpman
Declaring vars in loops - 09/26/17 19:10
Hi, is there a difference between declaring a var at the beginning of an action, compared to declaring a var within the actions loop?
action super_thing()
{
var Boop; //declared before the loop
while(1)
{
...
Boop+=1*time_step;
}
}
____________Compared to this:
action super_thing()
{
while(1)
{
var Boop; //declared before the loop
Boop+=1*time_step;
}
}
action super_thing()
{
var Boop; //declared before the loop
while(1)
{
...
Boop+=1*time_step;
}
}
____________Compared to this:
action super_thing()
{
while(1)
{
var Boop; //declared before the loop
Boop+=1*time_step;
}
}