SOLVED ...detection of Left and Right Mouse Buttons at the same time.

Started by Ytterbium, Sun 22/02/2004 16:38:04

Previous topic - Next topic

Ytterbium

I'd like my game to perform a different function if the Left and Right mouse buttons are clicked simaltaneously (sp?). I tried:
Code: ags
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?

Currently in production: Septigon

AJA

Maybe

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

because the button integer in on_mouse_click can only contain one value.

Ytterbium

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.

Currently in production: Septigon

SMF spam blocked by CleanTalk