Cursors!

  • #1, by divas1980Friday, 09. May 2014, 11:08 10 years ago
    Sorry (for my english) for the many questions but I am starting out.red

    Basically I want to that the cursor change was based on the object. The states are look, take, talk and use.
    I created inside interface "mouse" inside it I put states: look, take ecc ecc and for each action i have link the right cursor that i have create first in cursor.

    But when the action on the object i create "Executed command on the object" and select the command , for example "pick", the cursor does not change as I would expect ..
    I wish that the normal status is always active and that the icon changes depending on the object without having to create any object enter the area, leaves area

    tk againroll

    Newbie

    46 Posts


  • #2, by Marian77Friday, 09. May 2014, 11:49 10 years ago
    Maybe this will help you:

    http://www.visionaire-studio.net/forum/thread/interface-ques...

    There's also a link within the thread to a wikipage about the cursors and interfaces.

    Forum Fan

    231 Posts

  • #3, by afrlmeFriday, 09. May 2014, 13:06 10 years ago
    So... you want to use multiple commands, but only one command will be used on each object, character etc - sound about right? I wrote a global script for Thomas a while back that automatically detected which commands were available for each object so that when he opened up the coin interface over an object, only the available command icons were active, the rest were inactive (grayed out).

    We used Lua to loop through each action that was listed inside of the object below cursor which then set conditions based on what was returned.

    Here's the link to the script - it will not currently work for what you are wanting it to do... needs editing a little bit first. Obviously you would have to edit the table containing the commands to the names of commands you have in your own game & also to make it work automatically without having to call it then you could add a mouseEvent function to check if an object underneath cursor exists, this would be called each time the mouse moves, so you would have to add some if queries too to make it only trigger once on the object if the current command is not already the command listed in said object.

    Either way, it's not very simple for anyone new to Visionaire Studio, or Lua. Simply creating mouse enter, mouse leave actions for each object is not exactly difficult, just time consuming is all.

    Imperator

    7278 Posts

  • #4, by divas1980Friday, 09. May 2014, 14:02 10 years ago
    tk for help..now try the code...shock

    if dont work i use mouse leave and mouse enter!wink

    Newbie

    46 Posts

  • #5, by afrlmeFriday, 09. May 2014, 14:11 10 years ago
    hehe... it needs editing to make it work for what you are wanting it to do. I just linked it as a reference more than anything.

    mouse enter & mouse leaves is the easier option.

    Imperator

    7278 Posts