You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a game that uses a lot of dynamic dialogic event generation. In it, I could use the ability to declare variables for short script checks, as opposed to declaring them in the editor and saving them locally.
An example of this would be:
var {Looked} = false
You enter.
label actions
- look
if {Looked} == true:
This instead.
jump actions
You look around...
set {Looked} = true
jump actions
- leave
You leave the area...
jump exit
label exit
In that Looked is declared and checked if the player chose an option a second time.
The way I do it currently is to declare a bunch of generic variables then reuse them throughout out my events, but I think it would make more sense for the script to just handle this dynamically.
This also means once the variable goes out of scope (ie the Event ends), then that variable can no longer be used.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm working on a game that uses a lot of dynamic dialogic event generation. In it, I could use the ability to declare variables for short script checks, as opposed to declaring them in the editor and saving them locally.
An example of this would be:
In that
Looked
is declared and checked if the player chose an option a second time.The way I do it currently is to declare a bunch of generic variables then reuse them throughout out my events, but I think it would make more sense for the script to just handle this dynamically.
This also means once the variable goes out of scope (ie the Event ends), then that variable can no longer be used.
Beta Was this translation helpful? Give feedback.
All reactions