Sam and Max interface question

  • #1, by AmandaDayFriday, 29. May 2015, 15:22 5 years ago
    Hey everyone grin
    I've been noodling around creating a test game. I created a coin interface according to the video tutorials but wasn't entirely sure if I liked it. I wanted to give the old Sam and Max interface a try but was a bit unsure how to program the cursors. The text tutorial says this:
    Finally lets open the GAME tab and open the MOUSE PROPERTIES, the LEFT mouse button should be used only for INDIVIDUAL ACTIONS, but the RIGHT mouse button can be used in different ways, for this tutorial I want it to work similar to the way Sam&Max Hit the road game does, so when you use the right mouse button the cursors cycle. For setting this up select under the RIGHT mouse button the option ACTIVATES NEXT COMMAND


    I'm trying to find those options in the engine but it all seems to have changed. Does anyone know how to get the cursors arrows to activate on a left mouse button click and scroll through the cursors with the right mouse button click? Better yet, also allow cursor scrolling through the middle mouse button scroll wheel?

    Any help would be greatly appreciated smile
    Thanks!
    Amanda

    EDIT: I'm also having some problems with my fonts. I downloaded some free ones and put them in the true type font area, but for some reason they're not typing out properly. The "Space Width" option is greyed out and all of my letters are overlapping. I'm unsure why it's greyed out as it's obviously important to adjust. I'm able to adjust the letter spacing and line spacing but not the space width.

    Newbie

    32 Posts


  • #2, by afrlmeFriday, 29. May 2015, 16:07 5 years ago
    1. Since 4.x there's a new action part which allows you to toggle between the active commands: set command: next command. Just add that action part to the right mouse button actions inside of the mouse properties tab. As for the commands: you need to create a single interface which should contain all commands you want to allow the player to use. Assign a cursor to each command via its properties tab. Don't forget to set the standard command for the interface inside of the properties tab of the interface itself.

    2. Spacing is done automatically for TTF / OTF fonts, which is why it is greyed out.

    Quick question: have you enable font borders / shadows for the TTF font? There's a bug in current build (windows) in which fonts with borders enabled have broken spacing. If you disable the borders, then they should display correctly. I'm sure the devs will sort out the bug as soon as they can.

    Imperator

    6808 Posts

  • #3, by AmandaDayFriday, 29. May 2015, 16:13 5 years ago
    Seriously AFRL, I think if I ever manage to complete and sell a game, I'm gonna owe you some serious money lol.
    I'll have a play with what you said- these control panels are all still a bit new to me smile
    Thanks so much about the fonts too, yes the borders were the problem. Working great now! grin

    Newbie

    32 Posts

  • #4, by afrlmeFriday, 29. May 2015, 16:14 5 years ago
    No problem. smile

    Imperator

    6808 Posts

  • #5, by AmandaDayFriday, 29. May 2015, 19:03 5 years ago
    I'm sorry, I think I'm not understanding everything you said.
    Here's what I have so far...
    In the cursors tab I have my arrow (used for walking) look, use, and talk cursors with their active and inactive images.

    In the Interface tab I have one interface call MOUSE. In it I have Walk, Look, Use and talk buttons. Each are set as Command buttons. I've assigned the relevant cursors to each of them. On each Action Tab, I've got "Left Click" -> "Execute command on saved object".

    In the Scene tab I've set up an object with "Look executed","Use executed","Talk executed" to display text from the character.

    In the Game tab, Mouse Properties- on the Left Click I have "Show Main Interface" and "Execute command on saved object".
    On the Right Click I have "Set Command- Walk", "Set Next Command- Look", "Set Next Command-Use", "Set Next Command-Talk".

    At the moment when I test the game, the first cursor is the arrow, as I wanted- and I can run around easily. When I right click it goes straight to the Talk cursor though. I can use that Talk Cursor on the object and the character does what it's supposed to, but then the Cursor goes back to the arrow. When I click the right mouse button multiple times, it gets stuck on the Talk Cursor.

    I'm not sure why the talk cursor started to work and nothing else has as they're all set up the same as far as I can see. I'm so sorry if I sound useless, I have never worked with a gaming engine before so it's all very new to me.

    By the way, when I go to the Documentation section of the website, I can only see a few tutorials (great video tutorials) but all teach essentially the same basics and not much more. I went to the Manual but most of the items in there are unfinished or unclickable. The section on LUA scripting seems very informative but is way over my head at the moment.
    Is there anywhere that systematically goes through what each of the drop down commands do in Visionaire? I'm finding that trial and error is not working well for me LOL.

    Newbie

    32 Posts

  • #6, by AmandaDayFriday, 29. May 2015, 19:09 5 years ago
    I just changed the actions in the buttons to "left click" "set command" instead of "execute command on saved object" and nothing appears to have changed. I thought of that because one of the tutorials did it that way but no. red

    Newbie

    32 Posts

  • #7, by afrlmeFriday, 29. May 2015, 21:18 5 years ago
    In the manual section is a linked page "action parts" or something along those lines. It's not completely up to date as I last updated it a little bit before Visionaire Studio 4.0 came out, but most action parts & actions should be listed with a basic description of what they are for.

    Could you post some screenshots of your command interface & mouse related actions please? It will help me get a better idea of what it is you are doing & how you are going about it.

    Imperator

    6808 Posts

  • #8, by AmandaDayFriday, 29. May 2015, 21:35 5 years ago
    Thank you! grin I completely missed that, is was in with all the unclickable text lol.
    I took screen shots of everything I thought might help. There's not much there as I only just started setting it up, so I'm no doubt missing something important roll

    Newbie

    32 Posts

  • #9, by afrlmeFriday, 29. May 2015, 22:28 5 years ago
    Hmm... Ok, I see.

    1. In the right click action you only need one action part: set next command. You don't need to specify the command in the dropdown list as it doesn't work like that. It automatically checks the current command based on table index (something along those lines) & then determines which the next command should be & if the current index is the last command in the table then it jumps back to the first command.

    2. You don't have to specify left click actions for the command buttons in the interface. Just set the button type as command in the buttons properties tab & assign the cursor icon you want it to use.

    3. You shouldn't need to add any actions to the left click actions in the mouse properties tab. When you are right clicking to cycle through the commands, it will automatically set the command, which means that when you left click on a scene object or character which contains a "execute x command" action, it will automatically trigger the actions listed if the current command matches.

    Hopefully you are understanding what I'm talking about this time? wink

    P.S: personally I prefer the single command Broken Sword style command interface system as it's so much less hassle than any of the other systems, although according to some it can make the game less fun, as you are severely limiting the amount of player interaction when you simply make it left click for interaction & right click for examine.

    Imperator

    6808 Posts

  • #10, by AmandaDaySaturday, 30. May 2015, 04:31 5 years ago
    Thank you so much for explaining it so fully! That's the problem with tutorials, explain what to do without explaining why lol. Make's it tricky for a beginner to work outside of the tutorials red
    It works now, grin Had to read what you said a few times like a tool lol.
    I noticed that when I select (for example) the Look cursor and click on something, it follows through the action and then goes back to the Arrow. Is there a way to make it stay on the Look until you scroll it again? Or is this a lot more complex set of commands? I just thought it would reduce the RSI caused when trying to look at everything in a room razz

    EDIT: I got the mouse scroll wheel up working well, but the mouse scroll wheel down I can't seem to get scroll backwards. Is this done in LUA only?

    Newbie

    32 Posts

  • #11, by afrlmeSaturday, 30. May 2015, 11:31 5 years ago
    You mean for changing commands? I believe you would have to do an if query for that with action parts or with Lua script as there's no set previous command action part available at the minute.
    -- action part example...

    if command is 'walk'
    set command 'use'
    else
    if command is 'use'
    set command 'talk'
    else
    if command is 'talk'
    set command 'walk'
    end if
    end if
    end if
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14

    or here's a quick Lua example, if you are feeling adventurous...
    -- add this inside of an "execute a script" action part...

    if game.ActiveCommand:getName() == "Walk" then
    game.ActiveCommand = Buttons["Look"]
    elseif game.ActiveCommand:getName() == "Look" then
    game.ActiveCommand = Buttons["Use"]
    elseif game.ActiveCommand:getName() == "Use" then
    game.ActiveCommand = Buttons["Talk"]
    elseif game.ActiveCommand:getName() == "Talk" then
    game.ActiveCommand = Buttons["Walk"]
    end
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12

    ... the Lua example above would be for updating to the next command. To set previous command you just need to change the names to suit. If "walk" then set talk instead of look etc.

    As for the reason why it automatically jumps back to the default command after you click on something, it is because you have: Activate Standard Command in the game tab set to: Only after successful execution. This means that if you left click on something & it contains an action for the currently active command, that it will return success & automatically jump back to the default command. Just change the option to Never if you want the players to always have to change the command manually via right clicking or the mouse wheel.

    P.S: by the way, all command will allow the character to walk. If you don't want character to walk for the other commands then it might be an idea to add an if query to the left mouse actions under mouse properties. Just create an execute a script action & add this code to it...
    if game.ActiveCommand:getName() ~= "Walk" and not game.CurrentObject:isEmpty() then
    game.CurrentCharacter.CharacterState = 2 -- stop character
    end
    1
    2
    3
    4

    ... the code above will check if walk is not current command & there's no object / character below the cursor & if not then it will stop character from walking to a new destination. I've not tested the code, but it should work ok.

    Imperator

    6808 Posts

Write post