Runaway like mouse interaction + item dragging issue...

  • #1, by TheComedianTuesday, 09. July 2013, 21:26 7 years ago
    I have started working on my game using "Runaway like" mouse interaction as describe in GlenFX brilliant tutorial here : http://www2.visionaire2d.net/glenfx/parte_11.htm

    but i can't handle item interaction...

    I've tried many things with differents conditions but i'm stuck...

    Anyone understanding what i'm tryng to do and willing to help me out ?

    Newbie

    7 Posts


  • #2, by afrlmeTuesday, 09. July 2013, 23:07 7 years ago
    this tutorial is a little out of date & a few things have changed since it was made.

    the quickest & simplest method for achieving the runaway/broken sword/deponia style left click (interaction) & right click (examine) is just to create a single command button & call it "left_click"

    for the interacting with the objects we use mouse over & out only for changing the mouse cursor icons & then we use the action "executed command on object: left_click" to interact with objects & then you can also use "right click" (immediate or at destination) for defining the examine action.

    Check out Suro's video tutorials for an example of a simple left/right click interface.



    Imperator

    6842 Posts

  • #3, by TheComedianTuesday, 09. July 2013, 23:54 7 years ago
    Thanks for your answer...

    I have already seen thoses videos but this interface is not what i'm tryng to achieve... with this unique command button you can't change the command with right click... I don't want to trigger an action with right click....

    I 'm already using the change cursor on over trick...

    I currently have 2 differents command button : walk/look (by default) and take/use/talk (enable via right click on object).

    when i leave an object or character the command go back to walk/look...

    I have created a condition "item picked?" to be able to drag an item off the inventory without the command going back to walk/look... but i can't figure out a way to switch the command back to walk/look when the item is dragged on the wrong place or when the player perform a right click...

    It's a bit difficult to explain... maybe i'm not tryng the right way...All i want is to mimick the mouse behavior in runaway and it's not the case in the videos above...

    I'll let you know if I figure this out and any help will be appreciated...

    Newbie

    7 Posts

  • #4, by afrlmeWednesday, 10. July 2013, 00:41 7 years ago
    inside of mouse options tab under main game tab you can create generic mouse actions so in right mouse click you could use an if query to check if an item is being held (saved to memory) & then clear from memory & set to x command)

    You can also use the action part: if object below cursor exists/is a ...
    to determine if an object, character or nothing etc is below mouse cursor.

    I don't really remember how interface for first runaway worked (I played runaway 3 last year & as far as I remember it was the simple interface I described - but I have bad memory)

    Imperator

    6842 Posts

  • #5, by TheComedianWednesday, 10. July 2013, 02:13 7 years ago
    I have already tried the generic right click mouse action with no luck because when an object is being held... the individual execution for the right click is automatically set to drop the object and the custom right click action is not triggered...

    I may have to use your simple method but it really bother me to have one cursor for two actions...

    The engine is really easy to use for everything else... I don't understand why such a simple feature is such a pain to implement...

    thanks for your answer anyway...

    PS: I haven't play Runaway for a long time so maybe i'm wrong but the interface i'm trying to put together feels more natural to me and i really would like to get it done...

    Newbie

    7 Posts

  • #6, by afrlmeWednesday, 10. July 2013, 03:10 7 years ago
    hmm you don't need to have multiple commands for multiple cursors!

    you can just use on mouse enter & exit to change cursor under miscellaneous actions.
    if you create a cursor like the ones in say Deponia, which uses a sort of 2 sided badge design in which the left half has various action icons that vary depending on what your mouse cursor is hovering over & the right hand side has an eye/examine icon which animates when hovering over something which you can examine.

    the method in glenfx tutorial is an old method which as far as I'm aware,no longer works in the same way.
    a few people come one here every so often asking why x in the tutorial isn't working but if you check the title it says something like from VS 2.something to an early version of 3.x

    P.S: you could assign interaction actions to double click (use if queries to determine what it will do) & single click to change cursor if you don't want right click for examine (I don't really like double click interaction myself mind; for me it's more of a character run or double click on exit to instantly teleport to next scene)

    Imperator

    6842 Posts

  • #7, by TheComedianWednesday, 10. July 2013, 11:05 7 years ago
    A good night sleep helped me figure this out and it was simple !!

    I'll try to explain it here in clear terms if it can help anyone :

    I have two command :

    1 ) walk / look / take-use (command by default) (3 cursors)

    2) talk / take-use (enable via right click on object/character) (2 cursors)

    The cursor change depending on position (object or character)
    Right click on object enable second command.
    Leaving an object set the command back to default

    the "take-use" cursor is used with both command :

    when an object is on a scene the player interact with it with command 2

    when an object is in the inventory the player interact with it with command 1

    just don't forget to enable item dragging and combined command in your command 1 properties...


    Thanks again AFRLme for your time and answer...


    EDIT : in reality i have also multiples arrows cursors with all directions that i use on door/way over with command 1 to switch scene...



    Newbie

    7 Posts

  • #8, by afrlmeWednesday, 10. July 2013, 13:26 7 years ago
    ai sus razz

    you're welcome & all what you've just said you had to do is why I personally prefer the single command broken sword style interface - plus it will - probably - be best the interface type to use for iOS/android ported games when the target ports are ready.

    but hey, each to their own! wink

    Imperator

    6842 Posts

  • #9, by NigecWednesday, 10. July 2013, 17:53 7 years ago
    I think there's a problem now with set cursor and command being together ( I know my project broke around v3.5) and my control system was based on Glen's tutorial
    If I remember right it was using inventory items that messed up for me,

    Key Killer

    563 Posts

  • #10, by TheComedianWednesday, 10. July 2013, 18:14 7 years ago
    Nigec, If you read my first post, you'll see that using inventory item was my first issue but i've fixed it !!!

    I finnaly ended up using 3 commands and don't need to set cursor and command at the same time !!


    1 ) walk / look / take-use (command by default) (3 cursors)

    2) talk (enable via right click on object/character) (1 cursors)

    3) take-use ( (enable via right click on object/character) (1 cursors)

    my first command is the one i trigger to use item from the inventory...

    it's basically always on the walk cursor when it's anywhere... i change the cursor to "look" when i hover object or character and to the "take-use" cursor when i hover an item placeholder in my inventory...

    Now it's working perfectly...smile

    AFRLme, I'll worry about iOS port later (maybe never !!!wink)... i'm only testing this software on my freetime and don't plan to ever release my game or eventually as a freeware because i doubt i can ever finish a solid game and i'm using graphics i don't own...






    Newbie

    7 Posts

  • #11, by afrlmeWednesday, 10. July 2013, 19:05 7 years ago
    ah ok dokie, well have fun testing anyway wink

    Imperator

    6842 Posts

Write post