License from €75 Log in
DE EN FR ES IT CZ

Inventory Action Text

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 4 years ago
    Can someone show me how to make an alternative action text system for scanning over inventory items? I see in the inventory properties it allows for its own action text, but I can't figure out how to replace the standard action text, and I can't figure out how to set the rectangle.
  2. Working on a game?

    The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license.

    See licenses Try it for free
  3. · 4 years ago
    The action text for the Interface does not seem to be completely independent from the normal action text.

    For what I can see, you can set the rectangle for the inventory action text only by Lua:

    Interfaces["Name_of_Inventory"].ActionTextRect = {x=200, y=200, width=100, height=100}

    (adjust x, y, width and height to your needs and replace the name of the inventory with the name of yours)
    And add this line of code as "execute script" action part in the start action for the game.

    But this will not only draw the action text when hovering over items in the inventory, but for all objects. So you need to turn it on and off.
    You need to do this by using Lua again.

    Add to the line above a second line:
    Interfaces["Name_of_Inventory"].DrawActionText = false


    And in the action that shows your inventory the line
    Interfaces["Name_of_Inventory"].DrawActionText = true

    to turn off the normal action text, add the line:
    game.DrawActionText = 0


    To reverse this add in the action that hides the interface:
    Interfaces["Name_of_Inventory"].DrawActionText = false
    game.DrawActionText = 1


    0 means - no action text
    1 = action text at cursor
    2 = action text in rectangle

    Set the font for the action text in the properties of the inventory and then turn off the action text for the inventory. 

    There might be a better/easier way to do it, but it's the only one I saw just now.



This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?