Drag and drop inventory icon.

  • #1, by kirill-korolevThursday, 02. February 2023, 19:35 A year ago
    I recently started studying the program and I have this question: How can I implement the ability to drag the inventory icon (I have an icon in the form of a backpack) with the mouse to any part of the screen where the player wants to do it? Is it feasible in principle?

    Newbie

    6 Posts


  • #2, by afrlmeThursday, 02. February 2023, 23:20 A year ago
    What do you mean by drag the inventory icon? Are you talking about a coin/verb style command interface?

    P.S: I would highly recommend joining our Discord server as you are much more likely to get a faster response to any questions you ask.

    Imperator

    7278 Posts

  • #3, by esmeraldaFriday, 03. February 2023, 11:41 A year ago
    You mean let the player customize the UI?
    Drag the icon (button) that opens the inventory to a position of the players liking?

    Puh... might be possible with scripting, but definitivly out of my league.

    Key Killer

    513 Posts

  • #4, by kirill-korolevFriday, 03. February 2023, 14:41 A year ago
    You mean let the player customize the UI?
    Drag the icon (button) that opens the inventory to a position of the players liking?

    Puh... might be possible with scripting, but definitivly out of my league.
    This. The ability to freely drag this button (icon) opening inventory, around the screen as the player wishes.

    Newbie

    6 Posts

  • #5, by afrlmeFriday, 03. February 2023, 14:53 A year ago
    You mean let the player customize the UI?
    Drag the icon (button) that opens the inventory to a position of the players liking?

    Puh... might be possible with scripting, but definitivly out of my league.
    It's not out of your league - would be same as dragging around a scene object or animation, I suppose, but you would need to store the positions inside of the config.ini or something. Definitely going above & beyond what point & click adventure games usually allow. A simpler solution would be to let them pick specific locations on screen maybe, such as top left, top center, bottom right, etc.

    It would also introduce additional complications - for a point & click adventure game at least - because the interface would obstruct things below it, which means if it was placed on top of something in the scene that can be interacted with then that thing might not be accessible to the player, thus causing them to get stuck & not be able to progress in the game. For a first person shooter or game that uses keyboard + mouse &/or controller instead of a mouse cursor, it wouldn't matter so much where the UI elements are located on the scene, but for a game that relies on pointing & clicking, it's not really ideal letting the players control the UI elements.

    Imperator

    7278 Posts