0
Planned

Detecting Left or Right-Click in Trigger(s)

Byron Bennett 3 months ago in Game Creator updated by eagleeyez 2 months ago 3

Hello,

I'm trying to perform separate actions for when a player clicks on an object with Left-Click versus Right-Click. From my checking of the triggers, you can  have either a Left Mouse, Center Mouse, Right Mouse, or Mouse Down trigger, but the Mouse Down makes you select a button.

I didn't find a generic Mouse Down that would let me try checking for which button was pressed in a Condition.

I tried putting two triggers on the same object, but it only seems to capture the last trigger added. I even tried changing the Colliders in the triggers to Is Trigger = True.

How should I go about having a trigger that I can check for either a left or right mouse click?

Thanks,

Byron

Unity version:
2019.4.1
Game Creator version:
1.1.9
Planned

Although I agree that it might have been better to allow to have a Trigger that lets you choose which buttons let the Trigger be executed, adding two Triggers with On Mouse Left Click and On Mouse Right Click should definitely work.

I'm opening a ticket to have a look at this. I'll circle back once I have some news on this.

It works for me no problem


Add Cube: add trigger

trigger on mouse down left

action change color red

On Parent Cube add another trigger

trigger on mouse down right

action change color green

now with right I get green and with left I get red

and that constantly clicking bakc and forth between left and right