Manage the right click when an object is dropped

  • #1, by steph-j-6128Tuesday, 09. May 2023, 21:37 12 months ago
    Hello,

    I tried to set actions on right click on mouse properties and it works well except when an object is dropped.

    When I click on an object on the inventory to drop it and then do a right click, Visionaire just cancel the drop.

    How could I run the actions even if an object is dropped?

    It seems that when an object is dropped, the right click just cancel everything and prevent to do anything else.

    Thank you!

    Newbie

    17 Posts


  • #2, by afrlmeWednesday, 10. May 2023, 02:39 12 months ago
    Right click by default removes the item from hand &/or resets the current active command back to the standard command that you -  should have - specified in the properties section of your command interface.

    I'm not sure you can cancel this behavior... the only thing I can think of is that you don't actually use the dragged item system, but use pure commands + custom cursors instead. You could also technically use command + item too, but I don't remember off the top of my head whether or not right click removes the item from hand when you use them that way too.

    I personally use commands + custom cursors as it provides me with the most flexibility.

    Anyway, what is this thing with people wanting to use right click for interaction instead of left click? A few people ask about being able to do that each year.

    Imperator

    7278 Posts

  • #3, by steph-j-6128Wednesday, 10. May 2023, 09:23 12 months ago
    Thank you for your answer.

    To answer your last remark, I try to make an easy to use interface.

    I liked the proposition of Return to Monkey island where you only have left click to do an action and right click to look at an object and I try to do something in that spirit.

    My cursor is auto changing according to the object behind it. For exemple if the cursor is behind a usable object the cursor auto switch to  a "use" cursor. If the cursor is behind an object to take it auto switch to a "take" cursor.

    This is working well but if I right click when I have an object dropped from the inventory it doesn't react like I would like and it broke the game. I want to have the control of this right click to make the game react exactly like I want.

    I understand the if you want to use a classical Lucas-Art like interface this is not a problem but in some case it can be useful to have full control of the right click.

    Newbie

    17 Posts

  • #4, by afrlmeWednesday, 10. May 2023, 12:28 12 months ago
    You can have control over right click if you use commands. The command system you are describing is what most of us refer to as the broken sword (baphomets fluch) command system. Left click for interaction, right click for examine/cancel.

    Anyway, when I'm talking about using commands, I don't mean like the old retro text/icon "pick up", "talk to", "use", etc. I'm talking about using commands behind the scenes, while the game would still be using the simple left click to interact & right click to examine/cancel command system.

    The problem right now is that left click is hard coded into the engine that it is reserved for commands & right click is just right click or cancel if an item is currently being held by the active playable character. There's clever ways you could work around that, but it would most likely require you to do some scripting.

    Imperator

    7278 Posts

  • #5, by steph-j-6128Wednesday, 10. May 2023, 22:24 12 months ago
    Ok, I see.

    I searshed on documentation but didn't found how to hook the right click on helded objects.

    However, it seems what I wanted to fix is not directly linked to this.

    What I wanted to fix is the fact that when I do the left click with an helded objects, my cursor is blinking.

    I tried to disable the dropable option and I noticed that after click on an object on the inventory, when I left the placeholder zone I have the same blinking issue.

    So, I was erroneous on the cause of my issue and I need to search somewhere else.

    Newbie

    17 Posts

  • #6, by afrlmeThursday, 11. May 2023, 02:03 12 months ago
    Blinking?

    It would be helpful if you shared some screenshots or a video of how you setup the actions for the mouse enters/leaves & anything else that's relevant.

    Based on your initial post I thought you were complaining about right click canceling out the item because you were talking about right click & didn't mention anything about mouse overs.

    Imperator

    7278 Posts

  • #7, by steph-j-6128Thursday, 11. May 2023, 20:48 12 months ago
    Yes, because I was thinking that the left click was breaking the logic of my system but it was not that.

    I finaly found the cause of the issue thanks to the log console.
    There was simply an unwanted empty frame on one of my cursors.

    I lost severals hours just for that. I will take more attention to the log console now smile

    Newbie

    17 Posts

  • #8, by afrlmeThursday, 11. May 2023, 21:29 12 months ago
    Make you set the log level to "info" in the editor options > player tab as that will print the most information to the log.

    Imperator

    7278 Posts

Write post