Just remember that: 1 equal sign '=' sets a value. Note the difference in use of the equals '=' sign when checking a value versus setting it. You will get a conditional branch that looks like this (the event page would look like Branch: Script: $TIOK_BATTLE_ABORTED = Branch also, to set your new global switch to false, its just as easy as setting it to true: In the Conditional branch window, goto the 4th tab of options. You goto Event Commands,, 'Conditional Branch.'. Simply putting that in a script box will set the $GLOBAL variable TIOK_BATTLE_ABORTED to true. You can also use it for some simple ruby code though. This is commonly used to call functions from scripts made by other people or yourself. This allows you to process a small amount of ruby code within an event. Bottom right corner you'll see 'Script.' option. Use a global variable available within rgss3. I can't see where you made the mistake but I do have a suggestion that might make the problem, whatever it is, go away: This is a case of event code gone awry at some point. 'event code' refers to programming done within event code. Quick vocabulary thing for ya - 'scripts' generally refers to ruby rgss3 scripts. I even expanded my battle script by having the first page set "Battle Aborted" and a second page that fires only when "Battle Aborted" is ON doing the actual battle abort, but "Battle Aborted" (a global switch) is apparently set back to OFF once we leave the battle.Īre global switches not really global inside battle events? Am I operating on a copy of the global switches that isn't being preserved when the battle ends? Any other ideas for why I might be seeing this behavior?įrom what I can see all of your event coding looks fine. always thinks that "Battle Aborted" is off. I put a looping conditional branch on to confirm this. When I enter the battle and deliberately wait for the timer to run out, the battle is correctly aborted, but Script 3 always branches to. The conditional branch seems to be failing. Then it conditionally branches to if "Battle Aborted" is ON, or if "Battle Aborted" is off. calls Battle Processing for my scripted battle. ![]() Script 3 is a map event with three pages: It responds by setting a "Battle Aborted" switch and aborting the battle, returning you to the map. Script 2 is a battle event that fires when "Timer Ran Out" is set to on. ![]() I have it set as Parallel Process so it can run under the battle. Script 1 is a map event that sets a "Timer Ran Out" switch to ON when the timer runs out. The basic idea is to end an in-progress battle and do something on the map if a timer runs out, or something different if the battle ended normally. I have a setup with 3 separate scripts that interact via global switches.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |