[SOLVED] Right Click - Look Command

  • #1, by markus-creativeTuesday, 24. April 2018, 13:29 6 years ago
    Hello everybody,

    In my game I use a classic interface, meaning on the bottom of the screen there is the command interface with 9 commands e.g. like 'Use', 'Open', 'Close' and 'Look at'. The standard command is 'Walk to', which is common for these type of adventures. This command interface was used in Monkey Island or Thimbleweed Park to name a few.

    You have to left click first on one of these commands, so that the wanted command is active, then you have to click on an object to execute the command. So far so good. The only problem I have is, that it is pretty annoying with the 'Look at' command, because it is used that often.
    So I want to have 'Look at' also available on right click, meaning, if you right click, the 'Look at' command is executed immediately.

    I noticed that in VS 4.2.5. there is a menu called 'Mouse properties' with an editable  'Right mouse button' action. I edited the action part and added 'Set command 'Look at'. The result is, that, if you now right click in the game, the 'Look at' command is set active in the control interface, but not executed. You still have to left click again to have 'Look at' really executed. What I'm missing in the 'Right click action' is the possibility to have an execute command. The only thing I found is an 'execute command on saved object' but I have no clue what that is for.

    Does anybody know, how to solve this problem? Any help would be great.

    Newbie

    47 Posts


  • #2, by esmeraldaTuesday, 24. April 2018, 14:56 6 years ago
    you could just use the execution type "Right-Click" instead of your command and put in there the same actions as for the "look"-command.

    This wouldn't change the action text, though. 

    Key Killer

    508 Posts

  • #3, by markus-creativeTuesday, 24. April 2018, 16:03 6 years ago
    @ esmeralda

    Thank you for the suggestion.  I'm not sure, if I exactly know what you mean.
    Do you mean I should define an action for every object I want to look at as an execution type 'Right click' and inside the action I should put in the same actions steps as for the look-command?

    If I do this, I need two 'look-actions' for every object in the game, because I want to use "right click' for 'look at' but still the possibility to select 'look at' from the command interface. So I need one with the execution type 'Right click' and one with the execution type 'Execute command on object', right?

    A drawback of this is unfortunately, that when I use the "Right-click - look at', the action text is not shown, whereas when I select 'Look at' via the command interface the action text 'Look at object xy' is displayed.

    Is there maybe a more elegant and more efficiant solution for this 'right click' problem?

    Newbie

    47 Posts

  • #4, by afrlmeTuesday, 24. April 2018, 16:16 6 years ago
    You can link to an action block inside of the actions list, so you could have your "look at executed" action & then you could create a "right click executed" action & add a call action action part & link it to the "look at executed" action for the scene object. That way it will do the same thing without you having to create/copy/past the action parts into both blocks. Yes, yes it means you have to do a bit more work, but it should only take you 10-20 seconds or so per scene object that you want to be able to examime - which shouldn't take you that long really.

    As for the action text, I'm not really sure how you expect the engine to anticipate that someone is going to right click on the scene object. It should be enough for it to just display the action text of the scene object/character.

    Imperator

    7278 Posts

  • #5, by esmeraldaTuesday, 24. April 2018, 17:01 6 years ago
    Jep, that is what I meant.
    Either copy/paste the actions of your "look at" command or use the call action action part and link it to the "look at" action like AFRLme suggested. Both ways will lead to extra work, but not too much, I think.
    On the plus side, you are not limmited to the "look at"command. You could set the right click to any command. In Monkey Island or Thimbleweed Park the right click executed the most plausible command - so "open" a door, or "talk to" a character by right click.

    Regarding the action text - maybe you could change it via the "cursor enters object area" execution type. Wrap it in an if-query: If command is standard (=walk) command - change it to "look at". (downside - this way you cannot execute the walk command on these objects/characters)

    Key Killer

    508 Posts

  • #6, by markus-creativeTuesday, 24. April 2018, 17:34 6 years ago
    @ AFRLme

    Thank you very much for the answer. I will try it. 

    But I still wonder, if there's not a smarter solution. I would prefer a general solution for the 'right-click look at'. Unfortunately my VS experience and skills are not good enough and maybe I'm wrong, but wouldn't the 'Mouse properties' in specific the 'Right mouse button' entry in the options menu be a solution approach. There you can define a general click action for the right mouse button. But I fail to find and insert an 'execute command' action part for 'Look at'. The only thing I find is an 'Set Command'.

    Concerning the action text. I think you got me wrong on this, or I didn't describe it properly. What I meant is, if I select 'Look at' from the command interface with a left mouse button click the action text 'Look at' is displayed. I want the same behavior, when I do a right click on the scene. Meaning the 'Look at' action text should be show immediately at a right button click (button up) and if the mouse cursor is over an object at the moment, the object name should be added, like it is when I click on the 'Look at' button in the command interface.

    Newbie

    47 Posts

  • #7, by markus-creativeTuesday, 24. April 2018, 17:37 6 years ago
    Jep, that is what I meant.
    Either copy/paste the actions of your "look at" command or use the call action action part and link it to the "look at" action like AFRLme suggested. Both ways will lead to extra work, but not too much, I think.
    On the plus side, you are not limmited to the "look at"command. You could set the right click to any command. In Monkey Island or Thimbleweed Park the right click executed the most plausible command - so "open" a door, or "talk to" a character by right click.

    Regarding the action text - maybe you could change it via the "cursor enters object area" execution type. Wrap it in an if-query: If command is standard (=walk) command - change it to "look at". (downside - this way you cannot execute the walk command on these objects/characters)
    You are right concerning the situation related right click commands. Good idea.

    Concerning the action text, I thought of this as well.

    Newbie

    47 Posts

  • #8, by sebastianTuesday, 24. April 2018, 18:08 6 years ago
    i see you are Austrian?
    So maybe you can looknat the following tutorial i made a while ago. In thr later part i also discuss this rightclick feature:

    Thread Captain

    2346 Posts

  • #9, by markus-creativeTuesday, 24. April 2018, 18:27 6 years ago
    i see you are Austrian?
    So maybe you can looknat the following tutorial i made a while ago. In thr later part i also discuss this rightclick feature:



    Ja vielen Dank für die Hilfe. Es funktioniert jetzt!!   smile

    I knew I was on the right track with the 'Mouse Properties' and 'Right mouse button' action.

    For everybody, who faces the same problem. This is how the 'Right mouse button' action now looks like.

    Save object
    Set command 'Look at'
    Execute command on saved object
    Clear saved object

    @ sebastian
    Great Tutorial and really cool looking game btw.

    Newbie

    47 Posts