Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: tinyhippo on Wed 27/08/2014 09:26:55

Title: Using objects on objects
Post by: tinyhippo on Wed 27/08/2014 09:26:55
Hey!

Is there a simple way for a character to use an object on another object?

For example, the player clicks "use" on a chair, the cursor becomes that chair and the player is then able to click on a table in the room and use the chair on that table to "combine" them.
Title: Re: Using objects on objects
Post by: Khris on Wed 27/08/2014 11:24:23
Not really, you have to script it that way.
You can easily change the icon of a mouse mode: mouse.ChangeModeGraphic(eModeInteract, CHAIR_SPRITE);
Just make sure you keep track of what's happening next; if the player clicks anywhere else or changes the mouse mode, the game should revert fully to default behavior.
Title: Re: Using objects on objects
Post by: tinyhippo on Wed 27/08/2014 12:57:48
Quote from: Khris on Wed 27/08/2014 11:24:23
Not really, you have to script it that way.
You can easily change the icon of a mouse mode: mouse.ChangeModeGraphic(eModeInteract, CHAIR_SPRITE);
Just make sure you keep track of what's happening next; if the player clicks anywhere else or changes the mouse mode, the game should revert fully to default behavior.
Thanks, just thought there's a better way :)