change cursor - item inventory

  • #30, z EinzelkämpferWednesday, 26. July 2017, 10:32 hodinky 7 years ago
    I use it to have an indicator when an item is above an object like in mobkey island 3 . So i need something with inactive/active animations.
    Good point.

    But the best solution for this would be forcing the developers to add it to the system. grin

    Bažant

    81 Posts


  • #31, z stered86Wednesday, 26. July 2017, 11:07 hodinky 7 years ago
    Works great, sebastian, thank you very much! I'm just missing a couple of things and the system will be exactly how I wanted it:

    1- I can't remove an item via right click. Under "Mouse properties/Right mouse button" I created an action with these steps:

    call action "cur_default"
    change condition item_used to false
    execute a script 'oldItem=nil'
    I thought this would do the trick, but the current item remain set until I left click on something;

    2- Is there a way to keep the item set until the player press the right mouse button? Let's assume the player is stucked and wants to try every item on every object in the background (we all did that!), I think it would be annoying for him having to always click on the item in the inventory!

    Basically what I need to achieve is the player to be able to remove the item ONLY via right click!

    Bažant

    62 Posts

  • #32, z sebastianWednesday, 26. July 2017, 11:26 hodinky 7 years ago
    @1: just use the set item [empty] action part. The script will then do the rest (it then sees you dont have an item anymore and executes the default cursor action and sets the condition to false). Right now you do it manually but gets reset due to the scriot and youbare holding still an item. 

    Maybe wrap an if condition "item_used" around it so the item gets ibly emptied whennyou actually have one. 

    @2: In the game settings you can set the set standard command to "never". 

    Kapitán

    2346 Posts

  • #33, z afrlmeWednesday, 26. July 2017, 12:10 hodinky 7 years ago
    I use it to have an indicator when an item is above an object like in mobkey island 3 . So i need something with inactive/active animations.
    Good point.

    But the best solution for this would be forcing the developers to add it to the system. grin

    I kept asking. I want the item system to be the same as the cursor system. Active/Inactive animation. Scrap the static image bit as it's useless when someone can loop single image in an animation instead.

    Imperátor

    7285 Posts

  • #34, z stered86Wednesday, 26. July 2017, 12:12 hodinky 7 years ago
    @1: Perfect!

    @2: This one's strange. The item is automatically deselected once I use it, even if I set the standard command to never! Anyway, I could ignore this little problem,I'm very satisfied with the result.

    Thank you very much for your time, sebastian, my game looks much more professional now! And I think this system could be useful for other people too, maybe I should write a simple guide and post it (giving the credits to you, obviously)

    Bažant

    62 Posts

  • #35, z sebastianWednesday, 26. July 2017, 12:28 hodinky 7 years ago
    im preparing a intermediate video tutorial for this method with additional features. 

    Kapitán

    2346 Posts