Перейти к содержимому

Фотография

How to set a global variable from command line?


  • Пожалуйста, авторизуйтесь, чтобы ответить
2 ответов в этой теме

#1
Jereniva

Jereniva
  • Members
  • 114 сообщений

In many of my scripts, I put sections that send informational messages to the PC, and they're wrapped in a if gDebug = 1, and I set gDebug = 1 in the Module Load while testing.

 

Can I set a global variable from the command line, in game?

I guess I can just create a function to do it, and call the function, or is there an easier way?



#2
kevL

kevL
  • Members
  • 4 052 сообщений
`
debugmode 1
rs ga_global_int("variable", "value")
debugmode 0
`

note quotation marks around value even though it's an int. It gets converted
  • Это нравится: GCoyote и Jereniva

#3
Jereniva

Jereniva
  • Members
  • 114 сообщений

Perfect, thank you!