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

Object position in a display text

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

  1. · 9 years ago
    I would like to obtain the position of an object in the currentcharacter display text
  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. · 9 years ago
    hmm... you would need to store the object position in a value as a string or in 2 values as numbers.

    1. create a new value in right hand values tab for the scene. rename it to something appropriate.

    2. just before the display text action part, create an execute a script action part & add this line to it...
    local obj = game.CurrentScene.Objects["example"].Position
    Values["example"].String =  ("x = " .. obj.x .. " y = " .. obj.y)

    3. now inside of your display text you need to link to the value so insert this...
    <vs=example>

    <vs=example></vs=example></b> into your display text somewhere.</vs=example></div>

    Quick note: "example" should be replaced with the actual name you gave the value & the actual name of the object you want to store the position of into the value.
  4. · 9 years ago
    Thank AFRLme I will try it.
  5. · 9 years ago
    sorry, the auto-formatting on this forum sometimes. roll

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?