Makkeonmies
Member
In an object's Step Event theres a piece of code.
If certain conditions don't meet in this code, i want the object to quit the code, however not the entire Step event - the rest of the Step event outside the code i want to go on as usual.
I tried with exit; but that didnt work. Or is it supposed to be done with 'return?'
The code's smth like:
Step event:
if enemypar > 0
{
if distance_to_object(enemypar) < sight
{
If these conditions meet then here I want the code to end, and proceed with the Step event outside of it normally
}
}
else //if the conditions do not meet
{
code goes on...
}
If certain conditions don't meet in this code, i want the object to quit the code, however not the entire Step event - the rest of the Step event outside the code i want to go on as usual.
I tried with exit; but that didnt work. Or is it supposed to be done with 'return?'
The code's smth like:
Step event:
if enemypar > 0
{
if distance_to_object(enemypar) < sight
{
If these conditions meet then here I want the code to end, and proceed with the Step event outside of it normally
}
}
else //if the conditions do not meet
{
code goes on...
}