Home AMX User Forum NetLinx Studio

How to "read" a level?

Probably a newbie question, but is it possible to determine the value of a particular level without using a level_event? I know I can set a global variable every time a level changes, but I'd like to just refer to the level itself. Is there a keyword for this that I am just overlooking?

Comments

  • Jorde_VJorde_V Posts: 393
    Probably a newbie question, but is it possible to determine the value of a particular level without using a level_event? I know I can set a global variable every time a level changes, but I'd like to just refer to the level itself. Is there a keyword for this that I am just overlooking?

    level.value
  • If you use a level.value, how to you point it to the correct level? Wouldn't that be in a level_event? Or am I missing something?
  • Joe HebertJoe Hebert Posts: 2,159
    CREATE_LEVEL is probably your best bet.
  • I already have the level, though - I'm just trying to determine it's value without having to use a level_event. Is this not possible?
  • Joe HebertJoe Hebert Posts: 2,159
    Yes it’s possible with CREATE_LEVEL. Check out the help file. CREATE_LEVEL automatically updates a variable for you based on level changes. You don’t need a LEVEL_EVENT.
  • Gotcha. That may work for my situation. Thanks.
  • Joe HebertJoe Hebert Posts: 2,159
    To answer your question more thoroughly, there is no way that I know of to read the value of a level directly outside a LEVEL_EVENT. Your only real choices are to use a LEVEL_EVENT to update your variable or use CREATE_LEVEL and let the system update your variable for you.

    Have fun.
Sign In or Register to comment.