Automatically play of a script when a condition was set to true?

  • #1, z marvelSaturday, 06. April 2013, 18:05 hodinky 12 years ago
    Would it be possible to automatically play a script when a condition was set to true?

    In my case i have different values for the underground - like "wood", "gras", "stone" and so on. When i set the condition of wood to "true" automatically all other values should be set to "false".

    How could this be done?

    Zabiják klíčů

    599 Posts


  • #2, z afrlmeSaturday, 06. April 2013, 18:11 hodinky 12 years ago
    for me I would have a "call by other action" with all of the values set as false ... then after calling this add a very short "pause" for 10ms or something quick & then change value/condition to new one.

    Ideally, if you are only needing one value at a time, then I would recommend using a single value & changing the integer value to determine what should happen.

    Imperátor

    7285 Posts

  • #3, z marvelSaturday, 06. April 2013, 18:25 hodinky 12 years ago
    This is what i do right now. But its not the best solution because i could misinterpret the value wink The name of the condition would be much clearer

    Zabiják klíčů

    599 Posts

  • #4, z afrlmeSaturday, 06. April 2013, 18:30 hodinky 12 years ago
    You can use LUA to set & retrieve string values ...
    In essence you could use a single value & set the string value for it with LUA & then with LUA retrieve the value in a function to determine which floor type you are currently standing on ...

    of which you could have it perform the required actions with LUA or execute a "called by other action" action part.

    Imperátor

    7285 Posts