Login / Registrieren
DE EN FR ES IT CZ
Zurück Nach oben

Custom command property names for same interface action button (use door handle, pickup coin, press button)

  • #40, by sebastian 11 years ago Zitieren
    so i have to implement the new script in the old one? I may have to try&error this out. I never did Lua but the functions are quite easy to understand whats going on. I'll give Feedback this afternoon when im home from work
  • #41, by sebastian 11 years ago Zitieren
    Sadly i cant get this working.

    I thought naively about this, but it doesn't work either confuseroll :
    (mouse enter area):
    local button = getObject("Buttons[use]")
    button:setValue(VButtonName, jump in)
  • #42, by afrlme 11 years ago Zitieren
    You have to replace the text using the method shown in the script I posted. ButtonName is the name of the button & is nothing to do with the action text. The text is stored in the Language text tables.
  • #43, by sebastian 11 years ago Zitieren
    You have to replace the text using the method shown in the script I posted. ButtonName is the name of the button & is nothing to do with the action text. The text is stored in the Language text tables.

    Then
    "ButtonNamet_link to TextOnly used if button is a command (ButtonType = '3' or '6'). The name of the command which is shown in the action text." from the Wiki is a bit misunderstanding wink

    Ok, I'll give it a second go.

    EDIT: When i enter the objectarea i get this error in the log:

    Unknown datafield
    TextTextLanguages
    


    PS: is it possible to get some kind of livelog or do i have to do "TAB; print log" everytime?
  • #44, by afrlme 11 years ago Zitieren
    I've requested a runtime log feature to be added to a future version of VS in our team bug / feature tracker. I'm hoping Simon or David will get around to implementing one at some point. I'd even be happy if it was just a floating window that updated on new content or refreshed itself after every x amount of time. The first method would be more ideal mind.

    Ahh I forget. You might need to add .ButtonName if you are using my setText() function. I left the input vague so that users could input various tables, such as objects, buttons, characters etc.

    So, if you were using the function I provided on the previous page then it would be something like this...
    setText(Buttons["use"].ButtonName,"new text")
    

    ... you could actually remove the second parameter & sort out a bit of script inside of the main function to return the correct text based on the current language & integer value of a specified value. Food (text rather) for thought.
  • #45, by sebastian 11 years ago Zitieren
    Works razz
    Now I'll add language-support. I could try the language-table stuff in the "original" script you posted on the wiki. So the setText function goes like
    setText(Buttons["use"].ButtonName,2)
    

    and searches in the function the desired name of e.g. "2" in the active language .

    Thanks so far smile
  • #46, by sebastian 11 years ago Zitieren
    Next question regarding the renaming:
    Now when i have an item in my inventory I also want to rename some commands when entering their item-field. Because the items are not always in the same order i cant use the mouse-enter action at the itemfields

    Is there a method to get a mouseenter on SPECIFIC items (not the itemslots in the inventory)?

    I only found dragging and some clicking-triggers but no mouse-enter stuff at the actions-tab of the desired item.
  • #47, by afrlme 11 years ago Zitieren
    You might be able to use Lua script & a mouseEventHandler with some tables & a function which checks the current object under the cursor & if it is a item & then go from there. I can't say for sure it would work though, as I've never tried updating names of items.
  • #48, by sebastian 11 years ago Zitieren
    oha....oha....me and my lua skills red cry
    I will try my best and check if i can do this...
  • #49, by sebastian 11 years ago Zitieren
    got it working with help from this topic:
    http://www.visionaire-studio.net/forum/thread/global-script-...