Nisage 31 Report post Posted January 7, 2009 I wanted to use a different transition for different battle. One would be for normal random fights, while others for certain boss battles. I tried the Prepare/Execute Transition but that didn't work (speaking of which, does anyone know how to use prepare/execute and what they can be used for? I'm clueless with it) After some googling, I found a script that lets you change the transition for different battles. if $game_switches[N] $data_system.battle_transition = "002-Blind02" else $data_system.battle_transition = "001-Blind01" end The [N] is the number of the switch that's on. Example: If switch 3 is on, then the transition Blind02 will be used for battles, if it's not on then Blind01 will be used. Now the question you're probably thinking is "Where do you put this?" Right here........ Put Script Here In Scene_Map, under line 170. I tried it out and it works great. I found the script on a RMXP FAQ thing, and this time I put it in My Favorites so I wouldn't forget the site...... uh, once I find it that is............ Here it is, http://www.spivurno.com/uploads/rmxp_faq.htmI think that's about it, have fun with this new script and since it's almost midnight (ok it's 11:21 P.M., but that's close) I'm logging off (will fix any typos later). Share this post Link to post Share on other sites
Polraudio 122 Report post Posted January 7, 2009 if $game_switches[N] Change it to this. 1 is what ever switch you want to use. if $game_switches[1] == true or you can do it my way Here is what you could do. Before every boss battle use this Call Script $data_system.battle_transition = "Transition Here" So you can set the boss transition. And right after the boss battle change it again to the normal transition. Share this post Link to post Share on other sites
Leon 55 Report post Posted January 7, 2009 if $game_switches[N] Change it to this. 1 is what ever switch you want to use. if $game_switches[1] == true Just to fix a quick note so pol knows for future reference. Saying: if $game_switches[n] is the same as saying: if $game_switches[n] == true Share this post Link to post Share on other sites
Polraudio 122 Report post Posted January 7, 2009 Just to fix a quick note so pol knows for future reference. Saying: if $game_switches[n] is the same as saying: if $game_switches[n] == true Don't you need to replace the n to what ever number switch your using? I still think you need true Share this post Link to post Share on other sites
Leon 55 Report post Posted January 7, 2009 Yes, replace the n with the number of teh switch, but no, you do not need the true. Here's proof, straight from the standard RGSS: # If right window is active: call update_right if @right_window.active update_right return end That just checks if '@right_window.active' is true. And, if so, goes to method 'update_right' Source: Scene_Equip. I hate to call you out, Pol, I just want to make sure you don't make a mistake. Share this post Link to post Share on other sites
Polraudio 122 Report post Posted January 7, 2009 Yes, replace the n with the number of teh switch, but no, you do not need the true. Here's proof, straight from the standard RGSS: # If right window is active: call update_right if @right_window.active update_right return end That just checks if '@right_window.active' is true. And, if so, goes to method 'update_right' Source: Scene_Equip. I hate to call you out, Pol, I just want to make sure you don't make a mistake. Thats ok i like when you do that. I learn more. Did that answer your question Nisage? Share this post Link to post Share on other sites
Nisage 31 Report post Posted January 7, 2009 Not exactly. I know how to set it up for the two Transitions. if $game_switches[3] $data_system.battle_transition = "002-Blind02" else $data_system.battle_transition = "001-Blind01" end But I'm trying to figure out how to add more. If I dont have any of the certain switches on, it'll use the default one (in this case, Blind01). If one switch is on, it'll use that Transition (Blind02) Is there a way to add more to the script so it'll run other Transitions if other switches are on? And I've tried putting in $data_system.battle_transition = "003-Blind03" But it used the default, Blind01 or got an error messege when I made the event use Call Script with that in it. I tried to figure out how to put another one in by re-writing the script like so..... if $game_switches[3] $data_system.battle_transition = "002-Blind02" else if $game_switches[4] $data_system.battle_transition = "003-Blind03" else $data_system.battle_transition = "001-Blind01" end And my second try..... if $game_switches[3] $data_system.battle_transition = "002-Blind02" if $game_switches[4] $data_system.battle_transition = "003-Blind03" else $data_system.battle_transition = "001-Blind01" end The second try would only used Blind02. I'm not great with re-writing scripts, even though I thought it would be easy for this one. Share this post Link to post Share on other sites
Polraudio 122 Report post Posted January 7, 2009 You could do it my way here try the demo i set up. No scripts all simple event's well 1 event http://www.box.net/shared/n92dq2kiro Share this post Link to post Share on other sites
Leon 55 Report post Posted January 8, 2009 If Pol's doesn't work, try this: class Scene_Map alias leon_changetrans_scenemap_init initialize def initialize case $game_variables[1] when 0 $data_system.battle_transition = "001-Blind01" when 1 $data_system.battle_transition = "002-Blind02" end end end Essentially, this will check variable 1 for it's value, and set a battle transition based on it. You can add more using the 'when n' statement (when 2, when 3, etc.) Share this post Link to post Share on other sites
Nisage 31 Report post Posted January 8, 2009 Sorry for the late reply, busy with a few things (homework is one of them) Polraudio's way works (I still had the "if switch n is on" script in, which was why it didn't work when I tried Polraudios way), I'll try your way Leon to see which one is easier. I was going to post a Transition picture I found to share, but the computer wont let me upload anything at the moment (this computer can be stubborn sometimes). <_< Share this post Link to post Share on other sites
Polraudio 122 Report post Posted January 8, 2009 Good to hear it works. Share this post Link to post Share on other sites
Nisage 31 Report post Posted January 9, 2009 Yep. I hope the computer isn't stubborn now.... Transition Picture Alright, it's finally uploaded. Share this post Link to post Share on other sites
Polraudio 122 Report post Posted January 9, 2009 Looks nice, you should upload to gallery Share this post Link to post Share on other sites