[solved] Charakter walk on ceiling / Charakter an der Decke

  • #1, by stothewTuesday, 20. February 2018, 09:42 7 years ago
    Hi there,

    I have a Charakter walking on the ceiling (which i want)
    I can easily make him an fliped outfit but is there any idea for the text?
    It sould appear below him (which would be above because he is fliped), but as always the engine will do it above him...

    Any idea how to get the text below him?

    edit: it is a main Character and he is not always up there.
    Hope there is a better way than narration text and dummy talk animations..
    someting like textposition = textposition + (y * scale); but how?

    Thanks for help!

    --------

    Hallo,

    ich habe einen Chrakter der an der Decke laufen kann. (gewollt) Ihn in einem Outfit zu spiegeln ist kein Problem.. aber wie bekomme ich den Text den er sagt unter ihn?

    Ich bin gespannt auf eure Ideen.
    Danke!

    Forum Fan

    127 Posts


  • #2, by esmeraldaTuesday, 20. February 2018, 10:47 7 years ago
    There is a script for custom text position in the wiki:

    But that is no dynamic positioning. I guess it is possible to get the characters Position, do some math and then set the text positon via variables.

    Edit:

    function adaptedTextPosition(text)
      -- show texts of character Hero 10 pixel below character position
      local owner = text:getLink(VTextOwner)
      if owner:getId().tableId == eCharacters and owner:getName() == 'Hero' then
        local pos = owner:getPoint(VCharacterPosition)
        pos.y = pos.y + 10
        text:setValue(VTextPosition, pos)
        return true
      end
      return false
    end
    registerHookFunction("setTextPosition", "adaptedTextPosition")

    Key Killer

    533 Posts

  • #3, by stothewWednesday, 21. February 2018, 15:45 7 years ago
    This is looking great. I will try it.

    Thanks a lot!

    Forum Fan

    127 Posts

  • #4, by esmeraldaWednesday, 21. February 2018, 15:54 7 years ago
    I forgot: you might want to put in an if-query to determin, when the character is on the ceiling.
    You could create a condition in the scene (I called it "textunten") and toggle it with an action part, when the character is on/off the ceiling.

    in the script:

    function adaptedTextPosition(text)
    if getObject("Conditions[textunten]"):getBool(VConditionValue) then
    ....
    end 


    Key Killer

    533 Posts