well what I usually use is bool
like:
Code:
bool SomeFunctionCounter=0;
bool SomeFunctionSwitch=0
void SomefunctionONorOFF(void)
{
if ((IS_BUTTON_PRESSED(0, BUTTON_O)) && (IS_BUTTON_JUST_PRESSED(0, BUTTON_DPAD_UP)))
{
if (SomeFunctionCounter == 0)
{
SomeFunctionCounter = 1;
Print("ON");
SomeFunctionSwitch = 1;
}
else if(SomeFunctionCounter == 1)
{
SomeFunctionCounter = 0;
Print(" OFF");
}
}
}
void SomeOtherfunction(void)
{
if((SomeFunctionCounter == 1) && (SomeFunctionSwitch == 1))
{
StartDoingStuff();
}
}
void SomeOtherfunction2(void)
{
if((SomeFunctionCounter ==0) && (SomeFunctionSwitch == 1))
{
StartDoingOtherStuff();
SomeFunctionSwitch=0;
}
}
looks kinda dumb but It kinda gives you an idea on what stuff u can to with it.(not sure of the name of this) but I like to think of them as light switches.
is this what your after?