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

Changing parts of a line of script

  • #1, by lukas 4 years ago Zitieren
    I'm looking for a way to change parts of a line of script.
    I use afrlme's definition script for controlling animations.
    A line of script looks might look like this:

    setFrames("animation42", 5)


    I would like to be able to change parts of this line by calling a value. I'm aware I can't just make it work like this:

    setFrames("<vs=which_animation>", 5)


    or this:

    setFrames("Animation<v=animation_number>", 5)


    or this:

    setFrames("Animation42", <v=which_frame>)
    

    However those examples describe pretty much exactly what I would like to do. Is this even possible?
  • #2, by afrlme 4 years ago Zitieren
    setFrames("animation42", Values["example"].Int)
  • #3, by lukas 4 years ago Zitieren
    Works like a charm, thank you very much, this alone will save me hundreds of lines! Is there also a way to change the animation that is triggered by this line of script? The most comfortable thing would be to be able to replace the whole name of the animation by inserting a string, but even being able to replace the number part by inserting an integer value (so that it reads "animation43" instead of "animation42", e.g.) would make things so much easier.
  • #4, by afrlme 4 years ago Zitieren
    setFrames("animation" .. Values["animation number"].Int, Values["animation frame"].Int)