Congratz! Well, first off, you can simply try this:
void Function(string &in asEntity, int alState)
{
if (GetLocalVarInt("Var01") == 1)
{
//Do stuff
return;
}
else if (GetLocalVarInt("Var01") == 2)
{
//Do stuff
return;
}
}
There are many ways to do it.
void Function(string &in asEntity, int alState)
{
if (GetLocalVarInt("Var01") == 1)
{
//Do stuff
return;
}
else
{
//Do stuff
return;
}
}
The "&&" (and) and "||" (or) work perfectly the same way as of C++ and Angelscript. It's just that you weren't using it correctly. You can try this if the local variable "var01" equals 1 and the local variable "var02" equals 1.
void Function(string &in asEntity, int alState)
{
if ((GetLocalVarInt("Var01") == 1) && (GetLocalVarInt("Var02") == 1))
{
//Do stuff
return;
}
}
And also to add a little note here, the "else if" checks to see to check something to see if it's true, if the first part, the "if", is false. To be honest, this is intermediate scripting.