Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Ytterbium on Sun 22/02/2004 16:38:04

Title: SOLVED ...detection of Left and Right Mouse Buttons at the same time.
Post by: Ytterbium on Sun 22/02/2004 16:38:04
I'd like my game to perform a different function if the Left and Right mouse buttons are clicked simaltaneously (sp?). I tried:
if ((button==LEFT) && (button == RIGHT)) {
//lrmb code
}


Which didn't work. It also failed when I tried putting it inside the Left mouse button code. Is there any way to do this successfully?
Title: Re:Trying to script detection of Left and Right Mouse Buttons at the same time.
Post by: AJA on Sun 22/02/2004 17:37:58
Maybe

if (IsButtonDown(LEFT)==1) && (IsButtonDown(RIGHT)==1) { ... }

because the button integer in on_mouse_click can only contain one value.
Title: Re:Trying to script detection of Left and Right Mouse Buttons at the same time.
Post by: Ytterbium on Sun 22/02/2004 18:03:40
Thank you. This works. I put it under my Left mouse button script before anything else, for those of you who want to do the same.