I've got a rather long Javascript script that I need to use in a common event (it's a long switch statement and I'm having to use it since the Conditional Statements in MV Events don't have a way to compare a string variable value)
Anyway, it only let's me put in 12 lines, which isn't long enough. Based on the value of a string, I'm setting two variables
differently.
◆Script:switch($gameVariables.value(175)) {
:Script: case 'MM':
:Script: $gameVariables.setValue(177) = 1;
:Script: $gameVariables.setValue(178) = 1;
:Script: break;
:Script: case 'MA':
:Script: $gameVariables.setValue(177) = 1;
:Script: $gameVariables.setValue(178) = 2;
:Script: break;
:Script: case 'ME':
:Script: $gameVariables.setValue(177) = 1;
:Script: $gameVariables.setValue(178) = 3;
That's all it's letting me do, but the script needs to be longer. It is something that determines the day and time period during the day to notify the player of specific events. Variable 177 goes up to 7 (mon - sun) with 178 set to 1-3 for morning, afternoon, evening. (Night and Late Night don't apply for this CE)
Is there a way around this lenth limit or can I put it in a .js file and call it somehow?
Anyway, it only let's me put in 12 lines, which isn't long enough. Based on the value of a string, I'm setting two variables
differently.
◆Script:switch($gameVariables.value(175)) {
:Script: case 'MM':
:Script: $gameVariables.setValue(177) = 1;
:Script: $gameVariables.setValue(178) = 1;
:Script: break;
:Script: case 'MA':
:Script: $gameVariables.setValue(177) = 1;
:Script: $gameVariables.setValue(178) = 2;
:Script: break;
:Script: case 'ME':
:Script: $gameVariables.setValue(177) = 1;
:Script: $gameVariables.setValue(178) = 3;
That's all it's letting me do, but the script needs to be longer. It is something that determines the day and time period during the day to notify the player of specific events. Variable 177 goes up to 7 (mon - sun) with 178 set to 1-3 for morning, afternoon, evening. (Night and Late Night don't apply for this CE)
Is there a way around this lenth limit or can I put it in a .js file and call it somehow?