Keyboard + Mouse GUI - Is this possible?

Started by Toefur, Wed 28/07/2004 11:15:02

Previous topic - Next topic

Toefur

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.

monkey0506

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...

Scorpiorus

Yeah, that is it, but put the code within the on_mouse_click function not the on_key_press one.

SMF spam blocked by CleanTalk