Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Toefur on Wed 28/07/2004 11:15:02

Title: Keyboard + Mouse GUI - Is this possible?
Post by: Toefur on Wed 28/07/2004 11:15:02
Is it possible to have a system where different interactions(talking, looking, etc) are done by holding down a keyboard button and clicking the mouse button.

I wanted to do something like:

Left click - walk.
Control + Left Click - Look at
Shift + Left Click - Talk to.

Sort of like that.
Title: Re: Keyboard + Mouse GUI - Is this possible?
Post by: on Wed 28/07/2004 12:11:57
Not sure if it's possible, but perhaps something like this:

function on_key_press(int button){
  if (IsGamePaused()==1) button=0;
  else if (button==LEFT){
    if (IsKeyPressed(cntrl)==1){
      //script for look at
     }
//blah blah blah

This script probably won't work, and definitely needs work, but perhaps something like this would help...
Title: Re: Keyboard + Mouse GUI - Is this possible?
Post by: Scorpiorus on Tue 31/08/2004 20:26:05
Yeah, that is it, but put the code within the on_mouse_click function not the on_key_press one.