Dagoth Nereviar 0 Report post Posted August 27, 2007 In my RPG Maker game, I have a "HQ" where you can "talk" to the people currently available in your party.However, when I have cutscenes in the game, I want to show the current party. I'll give an example:(Made up names) Fred, Jim, Larry and Barry are in the party. I change Jim for Ted. Simple enough, I've done that code. I go out and, oh! A cutscene, and Fred, Ted, Larry and Barry need to be shown. I've got the code to make the actual events of the party members appear, I just can't get it to set the sprites of the current party members.I tried this (Fred is always the first hero, btw):First Event:If Jim is in the party. Sprite looks like Jim.If Larry is in the party. Sprite looks like Larry.If Barry is in the party. Sprite looks like Barry.If Ted is in the party. Sprite looks like Ted.Second Event:If Jim is in the party. Sprite looks like Jim.If Larry is in the party. Sprite looks like Larry.If Barry is in the party. Sprite looks like Barry.If Ted is in the party. Sprite looks like Ted.Third Event:If Jim is in the party. Sprite looks like Jim.If Larry is in the party. Sprite looks like Larry.If Barry is in the party. Sprite looks like Barry.If Ted is in the party. Sprite looks like Ted. However, the major floor in this code is that all 3 events will be set to Larry. The only way I can think around this is to have switches, and when the first event has seen that Larry is in the group, it turns a switch one (Something like "LarryIn") then when the second event looks, it looks to see if Larry is in the party. If he is, then it checks if the switch is on, if it is then skip, if not choose. I have alot of switches already, so I don't really want to do this, and it's alot of code to have.PS: I don't mind if the hero order in the menu is "Fred, Larry, Barry, Ted" but the event order shows "Fred, Ted, Larry, Barry" Share this post Link to post Share on other sites
DeM0nFiRe 0 Report post Posted August 27, 2007 Ok, I can help you. I also use RMXP... Alot. I'm actually an RGSS Scripter, so I'm here to save the day! :XD:Below is a script I made that will make it so you can call whose sprites you want to be displayed and more. If you want, you can also show sprites of someone who's not even in your party as like an NPC or something. It's hard to explain, just follow the instructions in the script to install and use. ################################################################################# - Title: DeM0nFiRe's Cutscenes ## - Scripted by: DeM0nFiRe ## - Current Version: V1.0 ## - Current Features: This scripts lets you create cutscenes with about 1/10 ## The effort needed to create the same cutscenes without ## this script. ## ## Currently, this script let's you create cutscenes with: ## -Widescreen Format ## -Top and Bottom Message ## -Wait For C ## -Yes, No Option ## -2,3 and 4 Choices ## -Map Background ## -Show, Move, and Flash Face ## -Dispose ## ##=======Make sure you read everything from this double line to the next========## - Requirements: AC_Windowskin_01(Information on obtaining this can be found ## in the script's topic thread. ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~## - Installation: 1.)Insert this script above main ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~## - How to Build a Cutscene: ## This script contains the building blocks for making cutscene, however ## the creativity of putting it together is all up to you. Below are the ## things you need to do to start making your cutscene. ## ## Preliminary Setup per Cutscene: ## 1.)Create an event or event page that you want to trigger the start of the ## cutscene. This could be something like an NPC that the player talks to, or ## an invisible event that the player steps on, it's up to you. ## ## 2.)Use the Call Script Command and put this line: @cutscene = Cutscene.new ## ## Building a Cutscene: ## To build a cutscene, you have to call the different methods contained in ## this script using the Call Script event command in the same event where ## you setup the cutscene. Below is a list of methods, what they do and how ## to call them ## ## Widescreen Format ## This gives an illusion of widescreen by putting black bars across the top ## and bottom of the screen. ## To Call: @cutscene.widescreen ## ## Top and Bottom Message ## These tow methods display a message on the top and bottom of the screen ## respectively. The top message is yellow, bottom is blue. ## To Call: Top: $top_message_1 = "[first line of the message]" ## $top_message_2 = "[second line of message]"(optional) ## @cutscene.message_top ## Bottom: $bottom_message_1 = "[first line of the message]" ## $bottom_message_2 = "[second line of message]"(optional) ## @cutscene.message_bottom ## ## Wait For C ## This will halt everything until the player presses the C button as defined ## in the game's controls. ## To Call: @cutscene.wait_for_c ## ## Yes, No Option ## This gives the player a choice between yes and no. If Yes is picked, ## switch 1000 will be on, if No, the switch will be off ## To Call: @cutscene.yes_no ## ## 2,3, and 4 Choices ## These 3 methods give the player a choice between 2, 3 and 4 choices. ## Variable 1000 will be set to the number of the choice selected by the ## player. ## To Call: 2 Choices: $choice_1 = "[choice]" ## $choice_2 = "[choice]" ## @cutscene.choices_2 ## 3 Choices: $choice_1 = "[choice]" ## $choice_2 = "[choice]" ## $choice_3 = "[choice]" ## @cutscene.choices_3 ## 4 Choices: $choice_1 = "[choice]" ## $choice_2 = "[choice]" ## $choice_3 = "[choice]" ## $choice_4 = "[choice]" ## @cutscene.choices_4 ## ## Map Background ## This will display the battle background for the map you're on. Useful for ## conversation cutscenes when combined with Show Face and the Messages ## To Call: @cutscene.map_background ## ## Show, Move and Flash Face ## These will show a face graphic, move an already called graphic, and flash ## a graphic respectively. ## NOTE: To use this feature you must put all face graphics you'll use in ## 'Pictures/Faces'. Also, the face graphics must be named Face_# where # is ## any number. This number is the number you'll use to call the face graphic. ## To Call: Show Face: @cutscene.face([x pixel],[y pixel],[number of face] ## Move Face: @cutscene.move_face([x],[y],[order in which you called ## the face you want to move ## Flash Face: @cutscene.flash_face([order in which you called the ## face you want to flash ## Dispose ## This will get rid of everything from your cutscene. However, if switches ## and variables have changed due to Yes, No or Choices, they will remain ## changed until you clear them. ## To Call: @cutscene.dispose ## ## NOTE: To make sure the cutscene doesn't repeat over and over, put an Erase ## Event or a Wait at the end of the cutscene event. ## If there are any other questions or problem, caontact DeM0nFiRe ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~## - Terms of Use: In order to use this script you MUST agree to ALL of the ## following: ## >You will credit DeM0nFiRe in any and all projects you ## you use this script in, or any pictures made to go ## this script ## >The pictures named in the requirements are for this ## ONLY, and may NOT be used for any other purpose ## >This script will be used ONLY for non-commercial(free)## projects. If you would like to use this script in a ## project for money, contact DeM0nFiRe. ##===Thank you for using DeM0nFiRe's Advanced Cutscenes=========================#################################################################################class Cutscene#------------------------------------------------------------------------------# - Initialize #------------------------------------------------------------------------------ def initialize @faces = [] @face_number = 0 end#------------------------------------------------------------------------------# - Widescreen #------------------------------------------------------------------------------ def widescreen @widescreen_top = Sprite.new @widescreen_top.bitmap = Bitmap.new(640,80) @widescreen_top.bitmap.fill_rect(0,0,640,100,Color.new(0,0,0)) @widescreen_top.z = 9998 @widescreen_bottom = Sprite.new @widescreen_bottom.bitmap = Bitmap.new(640,80) @widescreen_bottom.bitmap.fill_rect(0,0,640,100,Color.new(0,0,0)) @widescreen_bottom.y = 400 @widescreen_bottom.z = 9998 @widescreen_on = true end#------------------------------------------------------------------------------# - Bottom Message #------------------------------------------------------------------------------ def message_bottom if @message_bottom_on @message_bottom.dispose end @message_bottom = Sprite.new @message_bottom.bitmap = Bitmap.new(640,100) @message_bottom.bitmap.clear @message_bottom.bitmap.font.color = Color.new(150,150,255) @message_bottom.bitmap.draw_text(20,0,600,32,$bottom_message_1) if $bottom_message_2 != nil @message_bottom.bitmap.draw_text(20,32,600,32,$bottom_message_2) end @message_bottom.y = 400 @message_bottom.z = 9999 @message_bottom_on = true end#------------------------------------------------------------------------------# - Top Message #------------------------------------------------------------------------------ def message_top if @message_top_on @message_top.dispose end @message_top = Sprite.new @message_top.bitmap = Bitmap.new(640,100) @message_top.bitmap.clear @message_top.bitmap.font.color = Color.new(255,255,0) @message_top.bitmap.draw_text(20,0,600,32,$top_message_1) if $top_message_2 != nil @message_top.bitmap.draw_text(20,32,600,32,$top_message_2) end @message_top.y = 0 @message_top.z = 9999 @message_top_on = true end#------------------------------------------------------------------------------# - Wait For C #------------------------------------------------------------------------------ def wait_for_c loop do Graphics.update Input.update if Input.trigger?(Input::C) break end end end#------------------------------------------------------------------------------# - Yes, No, Option#------------------------------------------------------------------------------ def yes_no s1 = "Yes" s2 = "No" @command_window = Window_Command.new(192, [s1, s2]) @command_window.back_opacity = 0 @command_window.x = 320 - @command_window.width / 2 @command_window.y = 400 @command_window.windowskin = RPG::Cache.windowskin("AC_Windowskin_01") loop do Input.update Graphics.update @command_window.update if Input.trigger?(Input::C) break end end if @command_window.index == 0 $game_switches[1000] = true else $game_switches[1000] = false end @command_window.dispose end#------------------------------------------------------------------------------# - 2 Choices#------------------------------------------------------------------------------ def choices_2 s1 = $choice_1 s2 = $choice_2 @command_window = Window_Command.new(192, [s1, s2]) @command_window.back_opacity = 0 @command_window.x = 320 - @command_window.width / 2 @command_window.y = 400 @command_window.windowskin = RPG::Cache.windowskin("AC_Windowskin_01") loop do Input.update Graphics.update @command_window.update if Input.trigger?(Input::C) break end end $game_variables[1000] = @command_window.index + 1 @command_window.dispose end#------------------------------------------------------------------------------# - 3 Choices#------------------------------------------------------------------------------ def choices_3 s1 = $choice_1 s2 = $choice_2 s3 = $choice_3 @command_window = Window_Command.new(192, [s1, s2, s3]) @command_window.back_opacity = 0 @command_window.x = 320 - @command_window.width / 2 @command_window.y = 400 @command_window.windowskin = RPG::Cache.windowskin("AC_Windowskin_01") loop do Input.update Graphics.update @command_window.update if Input.trigger?(Input::C) break end end $game_variables[1000] = @command_window.index + 1 @command_window.dispose end#------------------------------------------------------------------------------# - 4 Choices#------------------------------------------------------------------------------ def choices_4 s1 = $choice_1 s2 = $choice_2 s3 = $choice_3 s4 = $choice_4 @command_window = Window_Command.new(192, [s1, s2, s3, s4]) @command_window.contents.font.size = 12 @command_window.back_opacity = 0 @command_window.x = 320 - @command_window.width / 2 @command_window.y = 400 @command_window.windowskin = RPG::Cache.windowskin("AC_Windowskin_01") @command_window.contents.font.size = 12 loop do Input.update Graphics.update @command_window.update if Input.trigger?(Input::C) break end end $game_variables[1000] = @command_window.index + 1 @command_window.dispose end#------------------------------------------------------------------------------# - Map Background#------------------------------------------------------------------------------ def map_background @map = load_data(sprintf("Data/Map%03d.rxdata", $game_map.map_id)) @map_background = Sprite.new @map_background.y = 80 @map_background.bitmap = RPG::Cache.battleback($data_tilesets[@map.tileset_id].battleback_name) @map_background_on = true end#------------------------------------------------------------------------------# - Show Face#------------------------------------------------------------------------------ def face(x,y,face_graphic) @face_number = @face_number + 1 @faces[@face_number] = Sprite.new @faces[@face_number].bitmap = RPG::Cache.picture("Faces/Face_" + face_graphic.to_s) @faces[@face_number].x = x @faces[@face_number].y = y @face_on = true end#------------------------------------------------------------------------------# - Move Face#------------------------------------------------------------------------------ def move_face(x,y,face_number) @faces[face_number].x = x @faces[face_number].y = y end#------------------------------------------------------------------------------# - Flash Face#------------------------------------------------------------------------------ def flash_face(face_number) @faces[face_number].flash(Color.new(255,255,255), 15) @frame = Graphics.frame_count loop do @faces[face_number].update Graphics.update if @frame == (Graphics.frame_count - 15) break end end end#------------------------------------------------------------------------------# - Dispose#------------------------------------------------------------------------------ def dispose if @widescreen_on @widescreen_top.dispose @widescreen_bottom.dispose end if @message_top_on @message_top.dispose end if @message_bottom_on @message_bottom.dispose end if @map_background_on @map_background.dispose end if @face_on for i in 1...(@face_number+1) @faces[i].bitmap.dispose @faces[i] = 0 end end endend Share this post Link to post Share on other sites
Dagoth Nereviar 0 Report post Posted August 28, 2007 Sorry, I forgot to mention it's an Rpg Maker 2000 game :XD:Stupid me >.< Thank you anyways for the reply I could never get scripts working in RMXP Share this post Link to post Share on other sites
DeM0nFiRe 0 Report post Posted August 28, 2007 (edited) Oh, heh. I personally don't like Rm2k/3 very much. I really don't use it so I can't help ya there, sorry. Edited August 28, 2007 by DeM0nFiRe (see edit history) Share this post Link to post Share on other sites
iGuest 3 Report post Posted December 20, 2007 is%20there%20anyway%20to%20use%20your%20own%20scripting%20in%202k3%3F Help In Rpg Maker I have a couple of scripts I already have written but I don't know how to insert them into the event box. Also if anyone knows how to make an item storing system (kinda like a bank) add that as well please -Snowman Share this post Link to post Share on other sites
demonatashadow 0 Report post Posted December 21, 2007 ok here is what i say to this post that you made.rpg maker is something that i have used but have never got the hang out the sciptingyou should try this new thing called blendermy friend tells me that it's very goof and that any game made by that is awesome Share this post Link to post Share on other sites