Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
Nisage

Transition

Recommended Posts

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........

TransitionScript.png
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.htm

I 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

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
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
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

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
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

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

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...