Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - BlueAngel

#161
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

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");
    
}

#162
I want to send a thank you too!
Never got this far without them (and all the good posts on the forum and lovely helpful people here  ;D )
Please put more of them up!
:)
#163
Thanks for all help, I found out that the scrip is working, its just that you have to click at a strange place of the object to get the script to work. Probely got something to do with the Inventory item cursor hotspot marker or my resolution? I post a new post when i got more information.  ;)
Thanks so much for helping me!
#164
Thanks for trying to help me.
It does say "iCheese_look" in the Cheese event panel next to the "look at inv item" just like it does in the working example with the the shoppinglist.
I cant se any differents between the two so it should work but it doesnt?
#165
Sorry for opening this again but I thought it was better than to start a new one.
I tried Ben304 solution and it worked great but then I wanted to do it again and somehow I messed it up because this time it didn’t work.
I looked up DoOnceOnly in the manual and so far as I can tell you can use it more times as long as the string is different?


This is how my code looks like, someone please help.

The first one works (listlook), its the Cheeselook that dont work. The cheese is in the inventory and I dont get any wrong message but nothing happens when i look at it (in the inventory)


Code: ags
function iShoppinglist_Look()
{
  if (Game.DoOnceOnly("listlook"))
  {
    cOskar.Say("Its the shoppinglist I got from Mum.");
  }
  else
  {
    cOskar.Say ("Funny it seams like something is written on the back of it!");
    player.LoseInventory(iShoppinglist);
    player.AddInventory (iGameIdea);
    GiveScore (5);
}
}

function cMum_Look()
{
  cOskar.Say("Thats my Mum!");
}



function iGameIdea_Look()
{
  Display ("Look, the game idea I wrote for my sisters game is written on the back! My mum must have take that paper by misstake");
  GiveScore(5);
}

function iCheese_Look()
{
  if (Game.DoOnceOnly("Cheeselook"))
  {
    cOskar.Say("Wow, thats is strange");
  }
  else
  {
    cOskar.Say ("How in the world did my mouse end up there?");
    player.LoseInventory(iCheese);
    player.AddInventory(iMouse);
    GiveScore(5);
}
  
}
#166
Thanks, I will try that! :)
It worked, thank you!
#167
Hi all!
I just stared using the AGS (3.1) and am making my first little game to understand it better.  I gotten this far by looking in the manual, searching the forum and trying out Densmings good You Tube videos but now I need help.

My character (cOskar) has got an inventory object (iShoppinglist) by a dialog so it is in his inventory.

I wish to make it so that when he looks at it (“It’s the shoppinglist I got from Mum”) it says it’s the shopping list but but then he looks at in again (or interact with it) it change from object iShoppinglist to object iMap (“Look something is written on it back”) (Player found new quest item, gets score).

Is that possible to make? I know that there is no interact button in the inventory in the Default game, I read something about using “talk to”? Or should I change the name of the item and keep picture if that easier?

Please, someone help me and please keep in mind that I just started and no nothing about scripting and excuse my bad English. Thank you.
SMF spam blocked by CleanTalk