Leon 55 Report post Posted September 8, 2010 Okay, I am not too keen on the User Submitted Scripts area, but this is posted there as well. At any rate, here is an Auto-Fade script. Should help make the transferring of the player somewhat easier. I know not everyone uses a 'fade' mechanic, so I didn't want to just edit the original 'Transfer Player' button. Now, the instructions are in the header of the script. Further, I included a demo as well. If I could, I'd include a screenshot, but that would do little justice, if any at all. Without further ado, here be the script: #=============================================================================== # Auto-fade transfer script # by Leon_Westbrooke # v. 1.01 #------------------------------------------------------------------------------- # # Instructions: # Place above main, but below all other scripts # Use the following commands in the 'Script' option in an event: # t = Tone.new(red, green, blue, gray) # Move.xfer(map_id, new_x, new_y, facing, t) # # red = Red tone # green = Green Tone # blue = Blue tone # gray = Gray tone # map_id = map id # new_x = destination x # new_y = destination y # facing = direction to face after moving # 2 = down # 4 = left # 6 = right # 8 = up # # So, a command should look like this: # t = Tone.new(-100, -100, -255, 0) # Move.xfer(1, 7, 10, 6, t) # #=============================================================================== module Move def self.xfer(map_id, new_x, new_y, facing, tone, fade = 25) if $game_temp.player_transferring or $game_temp.message_window_showing or $game_temp.transition_processing # End return end $game_screen.start_tone_change(Tone.new(-255, -255, -255, 0), fade) $game_temp.player_transferring = true wait = fade * 2 loop do $game_screen.update wait -= 2 if wait == 0 break end end $game_temp.player_new_map_id = map_id $game_temp.player_new_x = new_x $game_temp.player_new_y = new_y $game_temp.player_new_direction = facing Graphics.freeze # Set transition processing flag $game_temp.transition_processing = true $game_temp.transition_name = "" $game_screen.start_tone_change(tone, fade) end end 2 Marked and CrimsonInferno reacted to this Share this post Link to post Share on other sites
CrimsonInferno 35 Report post Posted September 8, 2010 Wow! Awesome script, Leon! I'm gonna test it! It would be a lot easier I think lol *reppies!* Share this post Link to post Share on other sites
Leon 55 Report post Posted September 8, 2010 Certainly hope it helps out. Share this post Link to post Share on other sites
CrimsonInferno 35 Report post Posted September 8, 2010 :o I get an error. Maybe I'm doing it wrong? >.> Share this post Link to post Share on other sites
Kiriashi 117 Report post Posted September 8, 2010 He can't help you unless you show him the error, hun. Leon, I'm going crazy right now 'cause I can't test this out. xD I guess I just have to wait till I get back. Share this post Link to post Share on other sites
CrimsonInferno 35 Report post Posted September 8, 2010 Oh, right, sorry >.> :o (Has never really gotten into a script before or scripting at all lol) Share this post Link to post Share on other sites
Leon 55 Report post Posted September 8, 2010 interesting error... are you trying to transfer during the Title Scene? Share this post Link to post Share on other sites
CrimsonInferno 35 Report post Posted September 8, 2010 Nope. I wouldn't even know how to do that :> I'm testing out the beginning of my game by having a small scene of a forest and then it transfers to another scene for a movie and then the player gets to move. But when I start the game up with the script, that error pops up and then shuts my game down lol Share this post Link to post Share on other sites
Leon 55 Report post Posted September 8, 2010 Well, I have just updated it so it will work in any Scene. Just a change in syntax. Share this post Link to post Share on other sites
CrimsonInferno 35 Report post Posted September 8, 2010 (edited) What is a Syntax...? >.> Alright, I'll try it out! EDIT: Now its all black. Maybe I'm doing something wrong....? Edited September 8, 2010 by CrimsonInferno Share this post Link to post Share on other sites
Leon 55 Report post Posted September 8, 2010 let me see your event code? what you are using, the entire window. (yes, redundant) I forgot! I should mention in the instructions, when it says this: # So, a command should look like this: # t = Tone.new(-100, -100, -255, 0) # Move.xfer(1, 7, 10, 6, t) the t = Tone.new(x, y, z, a) That is the Tone of the screen where you are transferring TO. It automatically fades to black. I should have specified that, and I am sorry. Share this post Link to post Share on other sites
CrimsonInferno 35 Report post Posted September 8, 2010 Ah, I see :P Its cool, others probably already knew, I just don't know anything about scripting. :sweatdrop: I'm gonna learn it soon, when my game at least has a near point of a demo lol How do I set up this in the script command window? "# Move.xfer(1, 7, 10, 6, t)" Share this post Link to post Share on other sites
Leon 55 Report post Posted September 9, 2010 For the command window, you use: t = Tone.new(r, g, b, a) Move.xfer(map_id, new_x, new_y, facing, t) But, you define the: r, g, b, a, map_id, new_x, new_y, facing. The 't' is the tone above it. And, that tone will be the tone of the next map you go to. You need both lines, but you have to define all those variables. Sounds hard, but it is kind of simple. Like in the example: t = Tone.new(-100, -100, -255, 0) Move.xfer(1, 7, 10, 6, t) I defined the t to be that particular tone (it will have no blue, just be a darker yellow), then the next map they move to would be the map with the id of 1, they'd be at x location 7, y location 10, and facing right. It sounds complex, I know... but when you get it down, it is quite easy. Share this post Link to post Share on other sites
CrimsonInferno 35 Report post Posted September 9, 2010 Oh I see. But to find the rest of the map numbers, you'd have to appoint with variables, right? To find the "X" location and the "Y" location....? Share this post Link to post Share on other sites
Leon 55 Report post Posted September 9, 2010 I believe so, if i understand you correctly. You just have to put in the variables, and it will transfer. I hate to get off topic, but have you an IM? If so, you can pm it to me, cuz this would be a lot easier to explain that way. Share this post Link to post Share on other sites
CrimsonInferno 35 Report post Posted September 9, 2010 Should be simple then! :D Thanks, Leon! :P Share this post Link to post Share on other sites