change cursor - item inventory

  • #1, z lyraTuesday, 16. February 2016, 09:54 hodinky 9 years ago
    Hi there,
    I want to change the cursor image that appears when you have selected an inventory item,
    because this appears very large,
    and I would like to change it and put a smaller drawing with arrow,
    What it is I have to do?
    I tried to create new cursors, but not how to do it well

    thanks!

    Bažant

    31 Posts


  • #2, z afrlmeTuesday, 16. February 2016, 11:42 hodinky 9 years ago
    You will need to deactivate the "dragged item" option & then you will need to manually set the active item & cursor inside of each items action tab inside of a command executed (immediate) action. The command should probably be whichever command you are using as your default command.

    As for the cursors: just create them in the normal cursor tab of Visionaire Studio.

    P.S: personally I don't use the item system itself, well... not the dragged item system or set item action as I prefer to create the items as commands instead. They are a lot easier to set & you can link the active cursor inside of each commands properties tab, plus you can easily run if queries on commands if needed.

    Imperátor

    7285 Posts

  • #3, z lyraTuesday, 16. February 2016, 16:18 hodinky 9 years ago
    I've done what you say

    I have disabled the drag option in the main cursor menu
    i created a cursor
    in object i write the inmmediate action:
    set item "object" (here i don't activate the drag option)
    set cursor "cursor"

    this change the image but the mouse don't work

    I try to make a button in the interfaces menu, (as in the main cursors) and "set command" instead of "set cursor", and this work.

    but I do not know how to remove the mouse once used the item

    Is it okay to do it this way?


    Bažant

    31 Posts

  • #4, z afrlmeTuesday, 16. February 2016, 16:39 hodinky 9 years ago
    Sure, I use the set command method. You need to set "only after successful execution" in the "activate standard command" drop-down menu in the main game tab. This will automatically reset the command & cursor back to the default command & cursor if you click on an object containing an execute command action relevant to the command you just executed on it.

    There are 2 problems using the command method though... if you click on an object that doesn't contain a relevant action then it will return false & thus will keep the currently active command instead of resetting back to the default command. Also right click will not reset the command back to the default command. You would need to create an action in the right mouse button section under game > mouse properties to reset the command back to default. If you always wanted to reset the cursor / command back to default when clicking on any scene object then you would need to add an if query to the left mouse button section (same place as right button, I just mentioned).

    if object exists
    set command "standard command"
    end if


    Good luck. wink

    Imperátor

    7285 Posts

  • #5, z lyraTuesday, 16. February 2016, 17:08 hodinky 9 years ago
    I already had activated: "only after successful execution" in the "activate standard command"
    and still does not work :s

    what I have to do?

    the righ click action to desactivate the command works (i write: "if "object-cursor" is current comand > set command "cursor-basic")

    Bažant

    31 Posts

  • #6, z afrlmeTuesday, 16. February 2016, 18:55 hodinky 9 years ago
    Could you post some screenshots of how you have set everything up please?

    Imperátor

    7285 Posts

  • #7, z lyraTuesday, 16. February 2016, 19:13 hodinky 9 years ago
    If you need some more screenshot, tell me, thanks!


    http://i809.photobucket.com/albums/zz19/lyra_malk/capt__0001_Capa%206_zpsrcgncfck.jpg " border="0" alt="" />

    http://i809.photobucket.com/albums/zz19/lyra_malk/capt__0005_Capa%201_zpsgut4umvf.jpg " border="0" alt="" />

    http://i809.photobucket.com/albums/zz19/lyra_malk/capt__0003_Capa%204_zpsjy4aambu.jpg " border="0" alt="" />

    http://i809.photobucket.com/albums/zz19/lyra_malk/capt__0000_Capa%202_zpsoji6vvqs.jpg " border="0" alt="" />

    http://i809.photobucket.com/albums/zz19/lyra_malk/capt__0002_Capa%205_zps7jsz9ut7.jpg " border="0" alt="" />

    Bažant

    31 Posts

  • #8, z afrlmeTuesday, 16. February 2016, 19:56 hodinky 9 years ago
    Ah you need to create all of the commands in the same interface that you have added the base / look commands to.

    P.S: I use a button (command) per item.

    Imperátor

    7285 Posts

  • #9, z lyraTuesday, 16. February 2016, 22:47 hodinky 9 years ago
    But... how do I disable the object cursors of the rotation of the basic cursors?

    Bažant

    31 Posts

  • #10, z afrlmeTuesday, 16. February 2016, 23:09 hodinky 9 years ago
    Ah, you are using a cycle command interface?

    If that's the case then, you could add an if query into the right mouse button actions (where I mentioned earlier).

    I'll write it in Lua script as I'm not in the right frame of mind to wrap my head around if queries in the editor itself. Easier with Lua anyway.

    1. create an execute a script action inside of the right mouse button actions under the game > mouse properties tab.

    2. insert this into it...
    if game.ActiveCommand:getName() == "funcur-base" then
     game.ActiveCommand = Buttons["funcur-look"]
    else
     game.ActiveCommand = Buttons["funcur-base"]
    end
    

    ... basically we are checking on right click if the active command is the base command then set it as look else reset back to base command.

    Imperátor

    7285 Posts

  • #11, z lyraWednesday, 17. February 2016, 09:28 hodinky 9 years ago
    Really Thanks!!! it works :3

    Bažant

    31 Posts