Hi
I'm looking at manual to find the best way of doing this:
EDIT: Surely must be:
Rep Exec
if(Enemy1a <= 0 && Enemy1b <= 0)
{
bool=true;
}
--------------------------
Int A (Enemy1a) plus Int B (Enemy1b) (or vise versa) = Bool false/true sort of thing.
I want to replace Enemy1a >= 1 && Enemy1b >= 1 with a bool=false and change if both Ints are met (Both Int=0) by Rep Exec to true.
{
if(cryan.ActiveInventory==igrenade && Enemy1a >= 1 && Enemy1b >= 1)
{
cblondie.FaceLocation(292, 206);
Grenades=(Grenades -1);
object[8].X =cblondie. x-0;
object[8].Y = cblondie.y- 0;
cblondie.ChangeView(10);
cblondie.Animate(0, 6, eOnce, eBlock);
object[8].Visible=true;
cblondie.ChangeView(7);
//PLUS MORE AS RANDOM INTS
Would someone please assist
cheers
Something like:
bool mybool;
function repeatedly_execute()
{
if (!Enemy1a && !Enemy1b) mybool = true;
}
if (cryan.ActiveInventory == igrenade && mybool)
?
Hi
I have already gone with another sure-fire option.
cheers
A small hint.
Since the result of any condition is boolean value on its own, writing
if (!Enemy1a && !Enemy1b) mybool = true;
is considered a bit redundant. Simplier way is
mybool = !Enemy1a && !Enemy1b;
Cheers Crimson Wizard,
Just to confirm (in case we have cross wires):
Enemy1a && Enemy1b are Ints that both start at 3 and when both reach 0 a bool becomes true.
Although I have chosen another option knowing this way may help me for later on.
cheers
While I'm here, I may as well slip this one in:
Rep Exec:
Is it possible to display Mouse Walk graphic while executing this code before changing modes?
}
if (mouse.Mode==eModeWalkto)
{
cryan.SpeechView=14;
cryan.Say("I'm too busy reading this map to walk around!");
mouse.SelectNextMode();
}
}
cheers again