Kain Nobel
Member
I'm doing alot of call script stuff with common events, don't ask me why, I just am.
Basically, when I found out I could write something other than numerical data into a $game_variables[0], I got all excited and thought I could use it for 'mode' names and stuff. But then I tried to use conditional branches and have stuff execute when you did it.
I made a one-touch door event that would open and close the door with a simple Common Event (and two pages, one with Self Switch A = ON).
I decided, I could make it so it could do it all four ways (incase somebody had a door graphic for side-doors).
So, I'd name the variable, "$game_variables[1] = 'left'" and sure enough it showed up when I pressed F9 as " 'left' ".
But then I tried to use it in a conditional branch
And I noticed... it just doesn't do anything. It doesn't pop up a SyntaxError, so I know its not the way I wrote it... but it doesn't execute conditions. Also the same with this simple example...
In this second example, I expected him to say at least one of the phrases (the one that didn't meet any condition), but it just simply didn't do anything. Maybe I just need to get a life and try something different.
Is there a way to get the game to recognize oddball variables like that? Or do I have to modify one of the default scripts (like something in the interpreter) to get it to work in an evented conditional branch?
Basically, when I found out I could write something other than numerical data into a $game_variables[0], I got all excited and thought I could use it for 'mode' names and stuff. But then I tried to use conditional branches and have stuff execute when you did it.
I made a one-touch door event that would open and close the door with a simple Common Event (and two pages, one with Self Switch A = ON).
I decided, I could make it so it could do it all four ways (incase somebody had a door graphic for side-doors).
So, I'd name the variable, "$game_variables[1] = 'left'" and sure enough it showed up when I pressed F9 as " 'left' ".
But then I tried to use it in a conditional branch
Code:
@>if $game_variables[1] == 'left'
 @>if Player facing Left
  @> (Makes door close, player takes 1 step forward.)
 End
End
And I noticed... it just doesn't do anything. It doesn't pop up a SyntaxError, so I know its not the way I wrote it... but it doesn't execute conditions. Also the same with this simple example...
Code:
@>Conditional Branch: Script: $game_variables[1] == 'already spoken'
 @>Text: So in other words... quit talking to me!
 @>
  Else
 @>Text: Hey, how's it goin'? What do you want? I don't think we've ever met before...
 @>Script: $game_variables[1] = 'already spoken'
 @>
 Branch End
@>end
In this second example, I expected him to say at least one of the phrases (the one that didn't meet any condition), but it just simply didn't do anything. Maybe I just need to get a life and try something different.
Is there a way to get the game to recognize oddball variables like that? Or do I have to modify one of the default scripts (like something in the interpreter) to get it to work in an evented conditional branch?