Hi everyone, I need help again.
I’m using the AGS (3.1) and I have looked in the manual and searched the forum but I can’t found the answer.
The goal of my game is to found five things and the putting them together to get a six item and I want the player to put them in a order.
I think I can do this with a if or else statement but not sure how?
This is what I have done so far: Place inventory object 1 on hotspot turning it to an object. Use inventory 2 on object, making it disappear and give the player points, if the player take another object then 2 - display message.
How do I go from there? I want it to check that the player puts object 3 next and nothing else and that object 2 is there first?
Sorry for my bad English, hope someone understands and can help. Here is my code.
Code: ags
I’m using the AGS (3.1) and I have looked in the manual and searched the forum but I can’t found the answer.
The goal of my game is to found five things and the putting them together to get a six item and I want the player to put them in a order.
I think I can do this with a if or else statement but not sure how?
This is what I have done so far: Place inventory object 1 on hotspot turning it to an object. Use inventory 2 on object, making it disappear and give the player points, if the player take another object then 2 - display message.
How do I go from there? I want it to check that the player puts object 3 next and nothing else and that object 2 is there first?
Sorry for my bad English, hope someone understands and can help. Here is my code.
function hDesk_UseInv()
{
if (cOskar.ActiveInventory == iComputer) {
cOskar.LoseInventory (iComputer);
oComputer.Visible = true;
GiveScore (5);
}
}
function oComputer_Look()
{
cOskar.Say("My old trusty friend!");
}
function oComputer_UseInv()
{
if (cOskar.ActiveInventory == iKeyboard){
cOskar.Walk(260, 483, eBlock, eWalkableAreas);
cOskar.Say("Good, now Im starting go get somewhere but where is my mouse?");
cOskar.LoseInventory (iKeyboard);
GiveScore (5);
}
else
cOskar.Say("I need to put something else there first");
}