drag 'n drop

  • #1, by lothar1585Monday, 23. February 2015, 21:11 6 years ago
    hi all
    i need a litle help ,for the use command i activated the grag 'n drop sistem from visionaire, when i have an item "dragged" and click with the right button of the mouse it turns in the "use" command, how can i turn in another command?
    for exemple item dragged, right click on nothing and the cursor became the "base cursor" not the use ..
    (i crated three interfaces + one, inventory, charter, object and base)
    thanks for the help

    Newbie

    3 Posts


  • #2, by afrlmeMonday, 23. February 2015, 21:50 6 years ago
    Hmm I'm not sure if I'm following what you are saying correctly...

    1. in the game tab > activate standard command: set to always or only after successful execution (as required).

    2. go to properties tab of the interface where you have added your command buttons & define the standard command. This is the command that it will reset to on successful execution or after left / right clicking depending on the option you set in the game tab & depending on the action you set in the right mouse button in the mouse properties tab.

    Alternatively, you could just create a set command action part in the right mouse button actions of the mouse properties tab.

    Imperator

    6842 Posts

  • #3, by lothar1585Monday, 23. February 2015, 22:03 6 years ago
    the problem is that when i click with the right button the cursor change from the image of the dragged item in the use button and after another click in the setted button

    Newbie

    3 Posts

  • #4, by afrlmeMonday, 23. February 2015, 22:40 6 years ago
    So you don't want it to change when you right click? you want it to keep holding the dragged item?

    Imperator

    6842 Posts

  • #5, by lothar1585Tuesday, 24. February 2015, 05:49 6 years ago
    i'd like that when the cursor has the image of an item (item dragged with the command "use") and click with the right button it pass from the item dragged to a "base " cursor without passing from the "use"at the moment it is like
    "item dragged"->(right click)->cursor became "use"->(right click)->cursor"base"
    i'd like
    "item dragged"->(right click)->cursor"base"
    hope that my problem is more clear now smile
    thanks for the help ^^

    Newbie

    3 Posts

  • #6, by afrlmeTuesday, 24. February 2015, 13:16 6 years ago
    Game > mouse properties > right click: create an execute a script action part & add this code to it...
    if not game.UsedItem:isEmpty() then game.ActiveCommand = Interfaces["interface_name"].StandardCommand -- replace interface_name with the name of your interface (names are case sensitive)
    1
    2

    ...untested code, but it should swap to standard command if an item is currently being held. You should also check the right click mouse action as it might contain a set next command action part. If you always want right click to set the standard command regardless of currently active command or whether or not the character is holding an item, then ignore my script & just add a set standard command action part to the right mouse click actions.

    Imperator

    6842 Posts

Write post