Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Sun 28/08/2005 21:09:35

Title: how do you use an inventory item on yourself?
Post by: on Sun 28/08/2005 21:09:35
First of all, how do you use an inventory item on yourself.  I am also having problems with this script.Ã, 

// script for Room: Walk off left screen edge

Display ("You don't really want to go back that way, do you?");

I am trying to make it that when the character tries to walk back to a previously explored room it will display this message ONCE and then get on with the game.Ã,  My problem is that it will keep displaying this message over and over and I can't make it stop.Ã,  I can't move or anything.  I had this problem when walking onto a hotspot and I fixed it by disabling the hotspot after displaying the message.Ã,  But in this case I don't know how to make the message stop.
Title: Re: how do you use an inventory item on yourself?
Post by: Ashen on Sun 28/08/2005 22:58:53
Firstly - the same way you use it on any character, by setting up the interaction in the 'Character' window.

Secondly - try adding a blocking Character.Walk command, to get the player back over the edge, e.g.

  // script for Room: Walk off left screen edge
player.Walk(player.x + 10,player.y,eBlock); // move player 10 pixels right.
Display ("You don't really want to go back that way, do you?");


(You might be better using a specific x value you know won't trigger the interaction.)
Title: Re: how do you use an inventory item on yourself?
Post by: on Sun 28/08/2005 23:03:27
That worked great, thanks alot.Ã,  But about using an item on yourself.  I see what you mean about the character interaction window, but how do you specify wich item to use and what it will do?
Title: Re: how do you use an inventory item on yourself?
Post by: on Sun 28/08/2005 23:12:38
Quote from: bjk7209 on Sun 28/08/2005 23:03:27
That worked great, thanks alot.Ã,  But about using an item on yourself.Ã,  I see what you mean about the character interaction window, but how do you specify wich item to use and what it will do?
nm, i just figured it out.  I'm a dummy.