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

Using an item from inventory on a scene object with a text " use 'item' on 'scene_obj'

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

  1. · 13 years ago
    Hi guys,

    I want to select the key from inventory and use it on a lock. But when I do it, I want to write a text on screen " use key on lock". How I can write it?
    When I select the key from inventory (drag-drop), key moves with the cursor and when I come on the lock (scene object) it just writes "lock". But I want to write "use key on lock". I'm using 3 cursors for the game. 1 default arrow, 2nd is look and 3rd is for any interaction (take, push, use etc..)

    Any ideas? smile

    Cheers...
  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. · 13 years ago
    I believe I wrote a lua script for this a while back. It's on the forum somewhere. It might actually be on the wiki too but I don't remember. If you weren't using dragged items then you would be able to use the junction command names.

    * edit: found it. Not sure if it's using the valid text code though as it was changed at some point. http://wiki.visionaire-tracker.net/wiki/Dynamic_Action_Names...
  4. · 13 years ago
    Hi,

    of course you can always use a getActionText hook for full flexibility (so you can define the displayed text in lua). In your case this isn't necessary though.

    What you want to achieve is the standard behavior. All you have to do is set the language dependent name for the command, conjunction word and item. This is the input field next to the flag icon. When you click on the flag icon you can change the displayed language (in case you support multiple languages). The name fields are found at:
    Interface -> select command -> command properties tab -> Name and conjunction word.
    Scene -> select scene object -> Properties tab -> Object name
  5. · 13 years ago
    With dragged items I don't think it displays the text associated with the command/item? only with items selected using the set item command. Actually not tried in 4.0 builds I don't think but previous builds it seemed to remove the text when dragging items.
  6. · 13 years ago
    it does. This was changed with release of Visionaire 4.0
  7. · 13 years ago
    That's me told then! razz
  8. · 13 years ago
    Hello Lee, thank you mate for that script. May I ask you to give an example how to use it in the game?
    I pasted the script and made it definition script. Then what should I do, how I should use the script and use it on which objects?

    Thank you mate!
  9. · 13 years ago
    why do you want to use a script when it's not necessary? as mentioned above this is already standard behavior.
  10. · 13 years ago
    Alex said the script is no longer required because they updated 4.0 so that it displays the action text, for dragged items too.

    I don't think my script is valid any longer anyway as I think I wrote it before the new getText methods & the old method no longer works.

    P.S: the page contained instructions but as said, you shouldn't need to use the script anyway.

    @Alex: I think the problem is that he is only using 1 interaction command & he's wanting the conjunction words to adjust based on which item is selected & which scene object it is hovering over the top of. If I remember correctly that was one of the reasons why I wrote the script as it decided which words to use from tables based on a value set on mouse enters action part on each scene object.
  11. · 13 years ago
    Yes Lee, that's the problem. I'm using just 1 interaction command.

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?