If I had the option of programming this in C or something like it, it would be fairly simple:
int barkeepX[4] = { 240, 246, 252, 258 };
int barkeepY[4] = { 30, 80, 160, 220 };
int barTop[4] = { 34, 84, 164, 224 };
int barStart[4] = { 30, 36, 42, 48 };
int barEnd[4] = { 236, 242, 248, 254 };
int barkeepIndex = 0;
if (pressup == true && barkeepIndex > 0)
{
barkeepIndex--;
}
if (pressdown == true && barkeepIndex < 3)
{
barkeepIndex++;
}
if (pressdown == true || pressup == true)
{
barkeep.x = barkeepX[barkeepIndex];
barkeep.y = barkeepY[barkeepIndex];
}
if (spacebar == true)
{
mugSpawn(barkeepIndex);
}
void mugSpawn(int index)
{
mug.y = barTop[index];
mug.x = barStart[index];
while (mug.x < barEnd[index])
{
mug.x++;
}
}
...etc. The logic seems simple and sound. I just don't know how to implement it with Construct 2. Boy, do I wish that it supported direct scripting for this sort of thing. I really, really, really hope that becomes a feature, or else I can't imagine sticking with Construct for very long once things get complicated.
Still, I want to give it a chance and learn (and I've already paid for the Personal license!), so what method would the veterans recommend?