Jump to content

UncannyBoots

Member
  • Content Count

    46
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by UncannyBoots

  1. There's a severe compatibility issue between victor's rotational moving script and the "set_char" animation script call in galv's move route script. I'm too defeated and tired to really go into detail but in a nutshell, galv's script relies on the default direction variable found in Game_CharacterBase, and victor's script completely changes how the direction variable works. This makes it so that when using "set_char" in a move route, it is impossible to select a different character direction. Victor's script splits the direction variable into three different variables, "current_direction", "final_direction" and "direction". It's very confusing to me. This is the area of galv's script that I believe needs fixing (and the "set_char" script call function is all I want from this script and is crucial): def set_char(name,index,pattern,direction) @gstop = true @direction = direction @pattern = pattern - 1 @character_name = name @character_index = index - 1 end I'll just link the entirety of Galv's script here. And here's the rotational moving script by Victor: #============================================================================== # ** Victor Engine - Rotational Turning #------------------------------------------------------------------------------ # Author : Victor Sant # # Version History: # v 1.00 - 2011.12.23 > First release # v 1.01 - 2011.12.30 > Fixed get on and off vehicle glitch # v 1.02 - 2012.01.01 > Fixed initial event direction and added new tags # v 1.03 - 2012.01.04 > Compatibility with Character Control # v 1.04 - 2012.05.30 > Compatibility with Pixel Movement # v 1.05 - 2012.07.24 > Compatibility with Moving Platforms # v 1.06 - 2012.11.03 > Fixed issue with direction ladders # > Fixed issue with direction after map transfer #------------------------------------------------------------------------------ # This scripts allows to set a different movement when the character changes # the direction he is facing, instead of facing directly the new direction # the character tunrs smoothly with a rotational movement. #------------------------------------------------------------------------------ # Compatibility # Requires the script 'Victor Engine - Basic Module' v 1.05 or higher # If used with 'Victor Engine - Multi Frames' place this bellow it. # # * Overwrite methods # class Game_CharacterBase # def set_direction(d) # # * Alias methods # class Game_CharacterBase # def init_private_members # def update # # class Game_Event < Game_Character # def clear_page_settings # def setup_page_settings # # class Game_Player < Game_Character # def initialize # # class Game_Interpreter # def comment_call # #------------------------------------------------------------------------------ # Instructions: # To instal the script, open you script editor and paste this script on # a new section bellow the Materials section. This script must also # be bellow the script 'Victor Engine - Basic' # #------------------------------------------------------------------------------ # Comment calls note tags: # Tags to be used in events comment box, works like a script call. # # <actor rotation on> # <actor rotation off> # These tags allows to turn the rotation move on or off for the player. # # <event i rotation on> # <event i rotation off> # These tags allows to turn the rotation move on or off for events. # i : event ID # #------------------------------------------------------------------------------ # Comment boxes note tags: # Tags to be used on events Comment boxes. They're different from the # comment call, they're called always the even refresh. # # <rotation move> # This tag allows the rotation move for events if VE_ROTATE_EVENTS = false # It enables the rotation move only for the page where the comment # is located # # <block rotation> # This tag disable the rotation move for events if VE_ROTATE_EVENTS = true # It disable the rotation move only for the page where the comment # is located # #============================================================================== #============================================================================== # ** Victor Engine #------------------------------------------------------------------------------ # Setting module for the Victor Engine #============================================================================== module Victor_Engine #-------------------------------------------------------------------------- # * Set rotational turning for events # If true, automatically all events will have rotational turning. # If false, you must add the rotational turning manually by adding the # comment tag for rotational turn on it. #-------------------------------------------------------------------------- VE_ROTATE_EVENTS = false #-------------------------------------------------------------------------- # * Set wait time between the frame change during rotation #-------------------------------------------------------------------------- VE_ROTATION_WAIT = 3 #-------------------------------------------------------------------------- # * required # This method checks for the existance of the basic module and other # VE scripts required for this script to work, don't edit this #-------------------------------------------------------------------------- def self.required(name, req, version, type = nil) if !$imported[:ve_basic_module] msg = "The script '%s' requires the script\n" msg += "'VE - Basic Module' v%s or higher above it to work properly\n" msg += "Go to http://victorenginescripts.wordpress.com/ to download this script." msgbox(sprintf(msg, self.script_name(name), version)) exit else self.required_script(name, req, version, type) end end #-------------------------------------------------------------------------- # * script_name # Get the script name base on the imported value, don't edit this #-------------------------------------------------------------------------- def self.script_name(name, ext = "VE") name = name.to_s.gsub("_", " ").upcase.split name.collect! {|char| char == ext ? "#{char} -" : char.capitalize } name.join(" ") end end $imported ||= {} $imported[:ve_roatation_turn] = 1.06 Victor_Engine.required(:ve_roatation_turn, :ve_basic_module, 1.05, :above) #============================================================================== # ** Game_CharacterBase #------------------------------------------------------------------------------ # This class deals with characters. Common to all characters, stores basic # data, such as coordinates and graphics. It's used as a superclass of the # Game_Character class. #============================================================================== class Game_CharacterBase #-------------------------------------------------------------------------- # * Overwrite method: set_direction #-------------------------------------------------------------------------- def set_direction(d) @stop_count = 0 return if @direction_fix || d == 0 || rotating? || (ladder_down? && d == 2) set_final_direction(d) @rotation_wait = VE_ROTATION_WAIT @clock_rotation = rotation_direction @current_direction = @final_direction if !rotation_enabled? || tranfering? update_direction if tranfering? end #-------------------------------------------------------------------------- # * Alias method: init_private_members #-------------------------------------------------------------------------- alias :init_private_members_ve_roatation_turn :init_private_members def init_private_members init_private_members_ve_roatation_turn @final_direction = 0 @current_direction = 0 @rotation_wait = 0 end #-------------------------------------------------------------------------- # * Alias method: update #-------------------------------------------------------------------------- alias :update_ve_roatation_turn :update def update update_rotation if rotating? update_ve_roatation_turn update_direction end #-------------------------------------------------------------------------- # * New method: set_final_direction #-------------------------------------------------------------------------- def set_final_direction(d) diag = $imported[:ve_diagonal_move] && diagonal_enabled? && diagonal? case d when 2 then @final_direction = diag ? 1 : 0 when 4 then @final_direction = diag ? 3 : 2 when 6 then @final_direction = diag ? 7 : 6 when 8 then @final_direction = diag ? 5 : 4 end end #-------------------------------------------------------------------------- # * New method: rotation_direction #-------------------------------------------------------------------------- def rotation_direction clock = 0 nclock = 8 clock += 1 while @final_direction != (@current_direction + clock) % 8 nclock -= 1 while @final_direction != (@current_direction + nclock) % 8 clock < (8 - nclock) end #-------------------------------------------------------------------------- # * New method: rotation_enabled? #-------------------------------------------------------------------------- def rotation_enabled? @rotation_enabled end #-------------------------------------------------------------------------- # * New method: rotating? #-------------------------------------------------------------------------- def rotating? @final_direction != @current_direction end #-------------------------------------------------------------------------- # * New method: update_rotation #-------------------------------------------------------------------------- def update_rotation @pattern = @original_pattern return @rotation_wait -= 1 if @rotation_wait > 0 @rotation_wait = VE_ROTATION_WAIT add = $imported[:ve_diagonal_move] ? 1 : 2 dir = @current_direction dir = (dir + add) % 8 if @clock_rotation dir = dir - add if !@clock_rotation dir = $imported[:ve_diagonal_move] ? 7 : 6 if dir < 0 @current_direction = dir end #-------------------------------------------------------------------------- # * New method: update_direction #-------------------------------------------------------------------------- def update_direction case @current_direction when 0 then @direction = 2; @diagonal = 0 when 1 then @direction = 2; @diagonal = 1 when 2 then @direction = 4; @diagonal = 0 when 3 then @direction = 4; @diagonal = 7 when 4 then @direction = 8; @diagonal = 0 when 5 then @direction = 8; @diagonal = 9 when 6 then @direction = 6; @diagonal = 0 when 7 then @direction = 4; @diagonal = 3 end end #-------------------------------------------------------------------------- # * New method: update_clear_direction #-------------------------------------------------------------------------- def update_clear_direction case @direction when 2 then @current_direction = @final_direction = 0 when 4 then @current_direction = @final_direction = 2 when 6 then @current_direction = @final_direction = 6 when 8 then @current_direction = @final_direction = 4 end end #-------------------------------------------------------------------------- # * New method: get_final_direction #-------------------------------------------------------------------------- def get_final_direction case @final_direction when 0 then [2, 0] when 1 then [2, 1] when 2 then [4, 0] when 3 then [4, 7] when 4 then [8, 0] when 5 then [8, 9] when 6 then [6, 0] when 7 then [4, 3] end end #-------------------------------------------------------------------------- # * New method: ladder_down? #-------------------------------------------------------------------------- def ladder_down? $game_map.ladder?(@x, @y + 1) end #-------------------------------------------------------------------------- # * New method: transfer? #-------------------------------------------------------------------------- def tranfering? $game_player.transfer? && (player? || follower?) end end #============================================================================== # ** Game_Event #------------------------------------------------------------------------------ # This class deals with events. It handles functions including event page # switching via condition determinants, and running parallel process events. # It's used within the Game_Map class. #============================================================================== class Game_Event < Game_Character #-------------------------------------------------------------------------- # * Alias method: clear_page_settings #-------------------------------------------------------------------------- alias :clear_page_settings_ve_roatation_turn :clear_page_settings def clear_page_settings clear_page_settings_ve_roatation_turn @rotation_enabled = false end #-------------------------------------------------------------------------- # * Alias method: setup_page_settings #-------------------------------------------------------------------------- alias :setup_page_settings_ve_roatation_turn :setup_page_settings def setup_page_settings setup_page_settings_ve_roatation_turn @rotation_enabled = VE_ROTATE_EVENTS || note =~ /<ROTATION MOVE>/i @rotation_enabled = false if note =~ /<BLOCK ROTATION>/i set_final_direction(@direction) @current_direction = @final_direction end #-------------------------------------------------------------------------- # * New method: rotation_on #-------------------------------------------------------------------------- def rotation_on @rotation_enabled = true end #-------------------------------------------------------------------------- # * New method: rotation_off #-------------------------------------------------------------------------- def rotation_off @rotation_enabled = false end end #============================================================================== # ** Game_Player #------------------------------------------------------------------------------ # This class handles maps. It includes event starting determinants and map # scrolling functions. The instance of this class is referenced by $game_map. #============================================================================== class Game_Player < Game_Character #-------------------------------------------------------------------------- # * Alias method: initialize #-------------------------------------------------------------------------- alias :initialize_ve_roatation_turn :initialize def initialize initialize_ve_roatation_turn rotation_on end #-------------------------------------------------------------------------- # * Alias method: get_on_off_vehicle #-------------------------------------------------------------------------- alias :get_on_off_vehicle_ve_roatation_turn :get_on_off_vehicle def get_on_off_vehicle return if rotating? get_on_off_vehicle_ve_roatation_turn end #-------------------------------------------------------------------------- # * Alias method: init_private_members #-------------------------------------------------------------------------- alias :clear_transfer_info_ve_roatation_turn :clear_transfer_info def clear_transfer_info clear_transfer_info_ve_roatation_turn update_clear_direction end #-------------------------------------------------------------------------- # * New method: rotation_on #-------------------------------------------------------------------------- def rotation_on @rotation_enabled = true @followers.rotation_on end #-------------------------------------------------------------------------- # * New method: rotation_off #-------------------------------------------------------------------------- def rotation_off @rotation_enabled = false @followers.rotation_off end end #============================================================================== # ** Game_Follower #------------------------------------------------------------------------------ # This class handles the followers. Followers are the actors of the party # that follows the leader in a line. It's used within the Game_Followers class. #============================================================================== class Game_Follower < Game_Character #-------------------------------------------------------------------------- # * New method: rotation_on #-------------------------------------------------------------------------- def rotation_on @rotation_enabled = true end #-------------------------------------------------------------------------- # * New method: rotation_off #-------------------------------------------------------------------------- def rotation_off @rotation_enabled = false end end #============================================================================== # ** Game_Followers #------------------------------------------------------------------------------ # This class handles the followers. It's a wrapper for the built-in class # "Array." It's used within the Game_Player class. #============================================================================== class Game_Followers #-------------------------------------------------------------------------- # * New method: rotation_on #-------------------------------------------------------------------------- def rotation_on each {|follower| follower.rotation_on } end #-------------------------------------------------------------------------- # * New method: rotation_off #-------------------------------------------------------------------------- def rotation_off each {|follower| follower.rotation_off } end end #============================================================================== # ** Game_Interpreter #------------------------------------------------------------------------------ # An interpreter for executing event commands. This class is used within the # Game_Map, Game_Troop, and Game_Event classes. #============================================================================== class Game_Interpreter #-------------------------------------------------------------------------- # * Alias method: comment_call #-------------------------------------------------------------------------- alias :comment_call_ve_roatation_turn :comment_call def comment_call call_change_actor_rotation call_change_event_rotation comment_call_ve_roatation_turn end #-------------------------------------------------------------------------- # * New method: call_change_actor_rotation #-------------------------------------------------------------------------- def call_change_actor_rotation if note =~ /<ACTOR ROTATION (ON|OFF)>/i $game_player.rotation_off if $1.upcase == "OFF" $game_player.rotation_on if $1.upcase == "ON" end end #-------------------------------------------------------------------------- # * New method: call_change_event_rotation #-------------------------------------------------------------------------- def call_change_event_rotation if note =~ /<EVENT (\d+) ROTATION (ON|OFF)>/i $game_map.events[$1.to_i].rotation_off if $2.upcase == "OFF" $game_map.events[$1.to_i].rotation_on if $2.upcase == "ON" end end end If I can't get this solved then I will disappointingly need to remove the rotational moving script, but I've grown very accustomed to it and would prefer not to. So if the direction variable in galv's script could be made to become compatible with victor's script, that'd be awesome... but in truth, I am completely stumped in how to do that. Thank you for any support, truly
  2. UncannyBoots

    Compatibility issue between movement scripts

    I don't know how I organized the scripts in that demo (I already deleted it from my pc) but I did it hastily. Did I put VE Engine above the bug fixes or something? (I just checked after redownloading the demo and yeah, that's what I did. It's not like that in my actual project tho) I put your fix into my project, and the same error continues to happen. I assume it fixed the error for you though? It might be my project so I'll redownload my demo and try it there. ...Yeah, it works in the sample project now (which is good!) but I must have yet another script in my project that is interfering with it. Sigh... I'll be looking for what it is. Thank you though! EDIT: I ended up deleting every script to see what it was that was conflicting with it, and it turns out... none of them. So it must be that I edited one of the default scripts and that is making it not work. I checkd Game_CharacterBase, Character, and Player, and none of them seem to have any changes to the direction variable. Do you have any idea what script it might be? No... it works. It was a very stupid error on my part. I fixed the typo a few posts back and I fixed it in the demo, but not in my game. Wow I'm dumb. Thank you very much for the fix, I'm so glad it works now
  3. UncannyBoots

    Compatibility issue between movement scripts

    When you input the first script call, the frame selected will be in the first character on the sprite sheet, the direction facing down. The second script call, when removing the rotational script, will then select a frame in the direction facing left (which, when using "Damage1" as an example, selects the blonde girl). When the rotation script is on, it doesn't select the left direction, it stays in the down direction. Updated the previous post, I made a typo that didn't demonstrate the script call properly. And here's a sample project showing the issue. Play once with Victor's rotational script, and play once without it. https://mega.nz/#!rEpiAALL!tv_uCDSxWBIBcwgAfF8drQk3RU1yHz-i_f5L2uCTjjU
  4. UncannyBoots

    Compatibility issue between movement scripts

    It's not an easy problem to explain but try using these script calls in a move route and see if the direction of the sprite changes. As far as I have tested, even in a new project (no other scripts) it doesn't change direction. "set_char("Damage1",1,2,2)" wait 60 frames "set_char("Damage1",1,1,4)" wait 60 frames
  5. How would I go about calling Common Event #8 during a map transfer? I already know where to place the code (it's in Game_Player), I just need to know what command I need to call. Thanks again 😭

    1. Show previous comments  4 more
    2. Kayzee

      Kayzee

      Yeah, that's pretty much exactly what I thought might happen. Though actually forgot that error was a thing and I kinda thought it would just bug out and not finish the common event right.

       

      And as for why eventing feels so much better than scripting? Well, first of all... can you really say that what you are doing is truly pure eventing if you are using a script call like "$game_player.transfer?" in a conditional branch? :P

       

      But more importantly, eventing is kinda like the dark side of the force. It flows easier for a lot of people and may help you get things done quicker, but eventually it takes it's toll. Of course we should all know by now that both the Jedi and the Sith were more then a little dumb. Just because a tool has problems doesn't mean you never use it, but it does mean that it isn't always the best tool for the job. :P

    3. UncannyBoots

      UncannyBoots

      " can you really say that what you are doing is truly pure eventing if you are using a script call like "$game_player.transfer?" in a conditional branch?"

      I get what you mean but I couldn't just put

      "if $game_player.transfer?

      <do this>

      end"

      in a script but I could easily do it in an event.

    4. Kayzee

      Kayzee

      I guess it's best to think of it like this: Events are handy for doing stuff yes. But scripting is more about making stuff. What I mean is, for events you are making a list of things you want to do when the event is run. Having lists of things you want to do is part of scripting too of course, but that's just part of what you are doing. A ton of scripting involves making different types of objects and telling the program what those objects are and how they work. In the context of an event a script call like "$game_player.transfer?" are like mysterious arcane words that invoke a higher power but lack any real meaning. In the context of scripting though we can understand and even change what those words actually mean.

       

      Once you get to an advanced enough level, I think scripting becomes so much more easy to deal with then events for a lot of things, just because without doing a lot of script calls you are pretty limited in how you can actually express your intentions. Would you rather make a complex card minigame thing as a large complicated event that uses a billion variables all over the place and probobly only half works, or would you rather be able to make it out of slightly more complex but still understandable parts? I mean using Arrays at the very least would be more helpful then a bunch of random variables. Arrays even already have a built-in way of shuffling them!

  6. UncannyBoots

    Game breaking common event problem

    I don't really know in which place to put this topic. It involves eventing which is kind of programming so I put it in this subforum. I'm having many many issues getting a motorcycle element in my game to work properly, but this is by far the biggest. I'll do a quick rundown of how the mechanic works, and what the issue is: In a parallel process common event, conditional branch checks if button is pressed. If it is, it will call another common event that changes player sprite, speed, and many other things and voila, he's riding a motorbike. It's like the Key Item button from Pokemon that allows the player to ride the bike with a press of a button. Press the button again and the opposite happens; the sprite turns back to the default player sprite, speed goes back to normal, etc. Now here's where the game breaking issue comes in. When walking onto a transfer event, right as the player moves onto that event, if you press the bike button immediately, the game transfers to the next screen and the common event is cut short. This is not a hard glitch to pull off, either. The switch that says the bike is on/off changes, but the graphic doesn't, the speed doesn't, and the other things don't change (for example, passability. You can pass over certain tiles on the bike that you cannot when walking. Player can't dash off of the bike is another thing). So the player will still be on the bike, will have a fast speed, but then cannot dash as if he is off of the bike, and can go over tiles that the bike isn't supposed to be able to ride over, because the bike switch is off, so the game thinks he's not on the bike. What truly baffles me, is that I have it so the switch turns on/off at the end of the conditional branch, while I have the dashing on/off near the middle of the command list, and everything else is either before the dash on/off or before the switch on/off. So evidently, common events don't even go through the command list in order? I haven't a single clue. Long story short, because this is complicated but this gets to the heart of the problem: How would I make it so that when pressing a button and walking onto a transfer event at the same time, the common event that gets called with that button press won't get stopped halfway through its processing?
  7. How do you check which direction the player is facing in RGSS?

    1. Show previous comments  6 more
    2. PhoenixSoul

      PhoenixSoul

      $game_player.direction == 8

    3. UncannyBoots

      UncannyBoots

      Yep, that works! Thank you!

    4. PhoenixSoul
  8. UncannyBoots

    Galv Camera Slide issue

    I'm back again lol. As usual I already have a gist of what needs to be done but I don't know how to actually write code in RGSS3. Unlike my last problem though I do believe this one will be a lot easier. So I'm using Galv's Cam Slide script. When riding a motorcycle in my game, you have the option to speed up. It goes very fast and when going up or down, the player outruns the screen cam slide, going off screen. The solution I'm thinking of is to change "ch = (Graphics.height / 2)" to be something like "ch = (Graphics.height / 2 + 100)" when the player is holding the up key and the shift key, and "ch = (Graphics.height / 2 - 100)" when the player is holding the down key and the shift key. How would you write that? Example: if [up key is pressed] && [shift key is pressed] ch = (Graphics.height / 2 + 100) elsif [down key is pressed] && [shift key is pressed] ch = (Graphics.height / 2 - 100) else ch = (Graphics.height / 2) end Replace the stuff inside "[ ]" with the actual script code. I don't know if you have to define button directions or not though Here's the script: #------------------------------------------------------------------------------# # Galv's Cam Slide Control #------------------------------------------------------------------------------# # For: RPGMAKER VX ACE # Version 1.0 #------------------------------------------------------------------------------# # 2015-10-09 - Version 1.0 - release #------------------------------------------------------------------------------# # This script gives the camera a slide effect and also more control of where # the camera is focused. You can set it to follow an event or scroll to an x,y # position on the map. #------------------------------------------------------------------------------- # SCRIPT CALL #------------------------------------------------------------------------------- # $game_map.camslide(status) # status can be true or false (default true) # # # when false - cam reverts to default, # # does not slide and 'scroll map' event works # # # when true - slide effect and targeting # # works but 'scroll map' does not. # # $game_map.camtarget(x,s) # x is event ID # # s is speed of camera scroll (800 default) # # the greater the speed the slower the scroll # # sets camslide to true automatically. # # $game_map.camtarget_xy(x,y,s) # x,y are the x,y co-ordinates on the map. # # s is speed (same as above) # # sets camslide to true automatically. # # $game_map.cam_default # sets camtarget back to player # # sets camslide to true automatically. #------------------------------------------------------------------------------- class Game_Player < Game_Character alias galv_scroll_gp_gc_update_scroll update_scroll def update_scroll(last_real_x, last_real_y) return if !$game_map.free_cam galv_scroll_gp_gc_update_scroll(last_real_x, last_real_y) end end class Game_Map attr_accessor :free_cam attr_accessor :camtarget alias galv_scroll_gm_initialize initialize def initialize galv_scroll_gm_initialize cam_default end def camslide(status) @free_cam = !status end alias galv_scroll_gm_setup setup def setup(map_id) cam_default galv_scroll_gm_setup(map_id) end def camtarget(x, spd = 800) @camtarget = @events[x] @free_cam = false @camspeed = spd end def camtarget_xy(x,y,spd = 800) @camtarget = Camxytarget.new @camtarget.camxy(x,y) @free_cam = false @camspeed = spd end def cam_default(speed = 800) @camtarget = $game_player @free_cam = false @camspeed = speed end alias galv_scroll_gm_update_scroll update_scroll def update_scroll return galv_scroll_gm_update_scroll if @free_cam @scroll_rest = 0 cw = (Graphics.width / 2) ch = (Graphics.height / 2) sx = 0.016 + (@camtarget.screen_x - cw).abs / @camspeed sy = 0.016 + (@camtarget.screen_y - ch).abs / @camspeed y_pos = @camtarget.screen_y.to_i x_pos = @camtarget.screen_x.to_i if y_pos < ch $game_map.scroll_up(sy) elsif y_pos > ch $game_map.scroll_down(sy) end if x_pos < cw $game_map.scroll_left(sx) elsif x_pos > cw $game_map.scroll_right(sx) end end end class Camxytarget < Game_CharacterBase def camxy(x,y) @x = x @y = y @real_x = @x @real_y = @y end end
  9. UncannyBoots

    Galv Camera Slide issue

    I'll give it a try, I'll report back here when I finish Edit: It didn't work :/ This is the code I currently have, starting with the line with "cw=" in the script cw = (Graphics.width / 2) if !$game_switches[169] ch = (Graphics.height / 2) else if Input.press?(:A) && Input.press?(:UP) && $game_player.moving? && !Input.press?(:RIGHT) && !Input.press?(:LEFT) ch = (Graphics.height / 2 + 120) elsif Input.press?(:A) && Input.press?(:DOWN) && $game_player.moving? && !Input.press?(:RIGHT) && !Input.press?(:LEFT) ch = (Graphics.height / 2 - 100) else ch = (Graphics.height / 2) end end If you want to test it out, make a common event with a cond branch where if switch 169 is on, character speed is 5. That will match the effect I have when player is on the bike and when you press shift, the player will speed up to 6. The resolution of my game is also weird, it's 512x288, a 16:9 aspect ratio, so that's why when moving up or down at a speed of 6, the player goes off of the screen. I have customized all of my menus to fit this resolution and I like how it makes my game have a more pixel art look so I don't want to change the resolution as a solution to this problem Another edit: I just noticed that when going left then turning up and keeping your finger on the left key (or right), the camera change doesn't activate. I put !input.press(left)/(right) there in order to prevent the opposite from happening -- from keeping the up key active while moving left/right. So there's just all sorts of things going wrong here. Is there perhaps a command like $game_player.moving? that checks if the player is moving up? That would omit the directional key checks entirely while maintaining the same effect. (Fun fact: that's actually what I originally asked in this topic before editing the original post because I thought it'd be more convenient to just use a key check. I'm stupid like that) Perhaps $game_player.moving? && [check if player facing up]? ^Crossed out the above because I think it'll be an easy issue to fix. I want to focus more on the screen stuttering/lag issue in this thread. Tbh "lag" isn't the right word. It is more like screen stuttering. When you remove 'game_player.moving?" the effect is very smooth. Add that line in and it isn't smooth. I don't know why that is and it's jarring because the camera will be smooth when going left/right but not up/down.
  10. UncannyBoots

    Galv Camera Slide issue

    I'm actually having another issue. I wrote "if Input.press?(:A) && Input.press?(:UP) && $game_player.moving?" and the screen stutters and lags a bunch. Removing game_player.moving will remove the lag, but the moving check is critical because if the player isn't moving, then the camera should not move when an input is pressed. How would I make it so that the script doesn't constantly refresh and check if the player is moving every frame? I think that's what the problem is
  11. UncannyBoots

    Galv Camera Slide issue

    Thank you! I knew about those commands in the back of my mind but for some reason I couldn't remember them until reading your post. I've got bad memory I guess
  12. I asked in my status about this but the solution is beyond whatever minimal scripting ability I have. I was going to link the status update here but it doesn't seem like I can lol but it's easy to find by clicking onto my profile. The status update is " Wish I knew how to change the z value of the player or of events. Anyone have any ideas?" I was just going to let it go but then I remembered that there has already been made a similar script that fixes the way star tiles work with large sprites: ##----------------------------------------------------------------------------- # Large Sprite ☆ Display Fix v1.3 # Created by Neon Black at request of seita # v1.4 - 12.18.14 - Added position tuning # v1.3 - 1.12.14 - Viewport/position issue fixes # v1.1 - 8.18.13 - Fixed an odd lag issue # v1.0 - 8.17.13 - Main script completed # For both commercial and non-commercial use as long as credit is given to # Neon Black and any additional authors. Licensed under Creative Commons # CC BY 4.0 - http://creativecommons.org/licenses/by/4.0/ ##----------------------------------------------------------------------------- ##------ ## By default, this script only affects the player. To allow it to affect ## an event page as well, add a comment with the tag <large sprite> to the page ## of the event you would like to have affected by this. class Sprite_Character < Sprite_Base ##------ ## The ID of the terrain used to display the large character above ☆ tiles. ## If the player is below this tile (y position), the sprite will appear ## above all tiles and events from that y position up. If the player is on ## the same tile or above (y position) the event will appear BELOW ☆ tiles ## from that position up. ##------ UpperTerrain = 1 ##------ ## This value is the pixel tuning used to check the location. This is ## because characters tagged with a '!' in their name are drawn lower than ## normal characters and are considered to be lower than these. This causes ## the script to think they are on the tile below where they really are and ## draw them above tiles they should appear under. ##------ Tuning = -1 alias :cp_011214_update_bitmap :update_bitmap def update_bitmap(*args) if graphic_changed? && @set_upper_area_sprite @force_no_gfx_change = true else @force_no_gfx_change = false end cp_011214_update_bitmap(*args) end ## Alias the update method to add in the new graphic check. alias :cp_073013_update_pos :update_position def update_position(*args) cp_073013_update_pos(*args) check_encompassed_area if sprite_is_onscreen? end ## Alias the dispose to dispose the upper sprite. alias :cp_073013_dispose :dispose def dispose(*args) @upper_area_sprite.dispose if @upper_area_sprite cp_073013_dispose(*args) end #~ ## Alias the graphic changed method to allow the sprite to revent to what it #~ ## was during the last frame. This allows the check to work again. #~ alias :cp_073013_graphic_changed? :graphic_changed? #~ def graphic_changed?(*args) #~ cp_073013_graphic_changed?(*args) || @set_upper_area_sprite #~ end ## Check if the sprite is onscreen. Reduces redundant drawing. def sprite_is_onscreen? return false if @character.is_a?(Game_Vehicle) || @character.is_a?(Game_Follower) return false unless @character.is_a?(Game_Player) || @character.large_sprite return false if @character.screen_z >= 200 top_left, bot_right = get_edge_corner_dis return false if top_left[0] > Graphics.width return false if top_left[1] > Graphics.height return false if bot_right[0] < 0 return false if bot_right[1] < 0 return true end ## Get the top left and bottom right positions. def get_edge_corner_dis top_left = [self.x - self.ox, self.y - self.oy] bot_right = [top_left[0] + self.width, top_left[1] + self.height] return [top_left, bot_right] end ## Long method that checks each position and draws the upper sprite. def check_encompassed_area if @set_upper_area_sprite && !@force_no_gfx_change old_src = self.src_rect.clone self.bitmap = @old_bitmap self.src_rect = old_src end @set_upper_area_sprite = false top_left, bot_right = get_edge_corner_dis last_x, last_y, copy_region = nil, nil, 0 map_xd, map_yd = $game_map.display_x * 32, $game_map.display_y * 32 total_height = (self.height + @character.jump_height).round self.width.times do |x| xp = map_xd.to_i + top_left[0] + x unless xp / 32 == last_x last_x = xp / 32 last_y, copy_region = nil, 0 total_height.times do |y| yp = map_yd.to_i + bot_right[1] + @character.jump_height - y + Tuning next if yp.to_i / 32 == last_y last_y = yp.to_i / 32 if last_y == (@character.screen_y + @character.jump_height + Tuning + map_yd).to_i / 32 break if $game_map.terrain_tag(last_x, last_y) == UpperTerrain next end next if $game_map.terrain_tag(last_x, last_y) != UpperTerrain copy_region = [self.height, total_height - y + 1].min set_upper_sprite break end end next if copy_region == 0 rect = Rect.new(src_rect.x + x, src_rect.y, 1, copy_region) @upper_area_sprite.bitmap.blt(x, 0, self.bitmap, rect) self.bitmap.clear_rect(rect) end if !@set_upper_area_sprite && @upper_area_sprite @upper_area_sprite.visible = false end end ## Creates the upper sprite that's a copy of the current sprite. def set_upper_sprite return if @set_upper_area_sprite @upper_area_sprite ||= Sprite.new @upper_area_sprite.bitmap = Bitmap.new(self.width, self.height) props = ["x", "y", "ox", "oy", "zoom_x", "zoom_y", "angle", "mirror", "bush_depth", "opacity", "blend_type", "color", "tone", "visible", "viewport"] props.each do |meth| @upper_area_sprite.method("#{meth}=").call(self.method(meth).call) end @upper_area_sprite.z = 200 @set_upper_area_sprite = true @old_bitmap, old_src_rect = self.bitmap, self.src_rect.clone self.bitmap = Bitmap.new(@old_bitmap.width, @old_bitmap.height) self.bitmap.blt(0, 0, @old_bitmap, @old_bitmap.rect) self.src_rect = old_src_rect end end class Game_Event < Game_Character attr_reader :large_sprite alias :cp_081713_setup_page_settings :setup_page_settings def setup_page_settings(*args) cp_081713_setup_page_settings(*args) get_large_sprite_conditions end def get_large_sprite_conditions @large_sprite = true return if @list.nil? || @list.empty? @list.each do |line| next unless line.code == 108 || line.code == 408 case line.parameters[0] when /<large sprite>/i @large_sprite = true end end end end I was wondering, then, if this could be a basis for a new script that fixes large sprites going over adjacent events? Keep in mind that I am no programmer. If I was I probably wouldn't have been so drawn to using RPG Maker :P
  13. You were a help, if you didn't help me I never would have realized that changing the z value would make it so that the large sprite's head would also go under the event. It seems obvious now but yeah I totally didn't realize that at the time. While this issue isn't some game breaking issue, it is very immersion breaking. I don't want to give away too much about my game (I dunno if I will release my game under this name "Uncannyboots" or not) but my character rides a motorcycle, and when he pulls up next to another character, the front wheel of the bike goes over the waist area of the event graphic. It looks really bad and unprofessional. I could definitely come back to this issue further down the line but I thought I'd ask just in case someone knew how to write the script. Your theory is definitely a good starting point, so thank you!
  14. Wish I knew how to change the z value of the player or of events. Anyone have any ideas?

    1. Show previous comments  5 more
    2. Kayzee

      Kayzee

      It would be pretty easy to make the player have a lower z value,  but if you do now you have a whole new problem.

       

      See... I see your problem in your example. That nun practically has her face right next to that snake lady's butt! Hardly proper nun behavior. So what if we made the wide sprite in your example have a lower z value so the nun standing to the side didn't look like she had a face of snake bum. And yes, that will indeed work! But wait, now another nun has snuck behind the snake lady and...

       

      image.png.19a0d975799b6d6b253ffe7790e40eb3.png

       

      Uh oh, oh my! The new nun seems to be sitting on the snake lady's face! How naughty! That's even less proper nun behavior! What's with all these naughty nuns molesting that poor snake lady? Ah, who am I kidding, the snake lady probobly started it by corrupting the nuns in the first place.. You know how those snakey monster girls can be. Hora hora. <3

       

      Now is this fixable? Yes, but only if you come up with a whole new way to calculate the z value for every character sprite. As is, character sprites with the same priority have the same z value, and sprites with the same z value are drawn from top to bottom, and I think left to right. For this to work the way you want it to, you would basically need to give each row of sprites their own z value, and then further let wide sprites in each row have a lower z value. Note also: Any character sprite with a z value of > 200 will be drawn over tiles that normally are drawn over any characters. I think you might be able to use floats as a z value though.

       

    3. UncannyBoots

      UncannyBoots

      Yeah that's way beyond my skill level :/ I thought it would have been simpler. Maybe I should make a thread after all, but I don't have time right now

    4. Kayzee

      Kayzee

      What? No comments about my lewd double entendres involving nuns and snake ladies? Anyway, I see you did end up making that thread! :3

  15. Got another quick (I think) problem to fix: The player in my game can ride vehicles and the vehicle graphic is larger than 32x32 pixels (no wider than 60 pixels though). When the vehicle is next to an event, the part that pokes into another tile (since again it is longer than 32 px) ends up displaying over the event graphic beside it. So, I think if I could make it so that by default the player z value is below "Same as Character" events, the edge of the vehicle (which is actually just the character sprite changed into my character riding the vehicle) won't go over the event graphic but instead under it, which would look far better. Is there a way to change the z value of Same as Character events?
  16. Awesome, thanks! I totally missed Scene_Load, seems pretty obvious now haha
  17. Might as well post here for another question... I have a fog script that must be summoned by an event and then go to another event page as to not keep calling the activation (which makes it so that the fog refuses to move because it keeps getting called over and over again back into its starting postion). So I use a switch and another event page will open as a result of that switch turning on. Moving to another map will turn that switch off, so that when returning to the map the fog activates again. But if you save the game and then load the save file, the switch is still on, and the fog therefore does not get called. So now that the introduction to the problem is out of the way: what I need to do is have it so that when a save file is selected to load, switch 138 will turn off. How would I do that?
  18. Are there any scripts or ways in general to make a custom vehicle -- think a car or a motorbike -- that can drive over certain impassible tiles (like rough potholes and ditches that the player normally cannot walk over)? I don't know how to write a script from scratch but I have an idea of how it would be done. When player has $game_switches[x] on, tiles covered with a specific region ID will be passable. Something like that should work in theory, I think...
  19. UncannyBoots

    Vehicle that can pass through certain impassible tiles

    Thanks, but Kayzee's script does exactly what I needed so this thread is solved haha
  20. Is there any equivalent script code to "$game_map.interpreter.running?", but for autorun events? And not only for common events but for autorun events on the map too.

     

    Don't think this deserves its own thread so I thought I'd ask here.

    1. Show previous comments  12 more
    2. UncannyBoots

      UncannyBoots

      It is an improvement, making the animation stop a little less but it still lags a bit so it isn't perfect, but hey I'll take it. Thank you!

    3. UncannyBoots

      UncannyBoots

      #==============================================================================
      # ■ Meow Face Wall Bump Step Anime
      #------------------------------------------------------------------------------
      # Continue Step Anime when bumping into wall
      #==============================================================================
      class Game_Player < Game_Character  
        alias meowface_gp_wall_walk_update update  
        def update    
          meowface_gp_wall_walk_update  
          if $game_switches[3] || $game_switches[169]
            @last_step_anime = @step_anime = true
          else
            unless $game_map.interpreter.running? && $game_map.interpreter.map_id == $game_map.map_id && $game_map.interpreter.event_id != 0 && $game_map.events[$game_map.interpreter.event_id].trigger == 3 || $game_message.visible
              if Input.dir4 > 0     
                @step_anime = true
              else      
                @step_anime = false
              end
              @last_step_anime = @step_anime
            else
              @step_anime = @last_step_anime
              @last_step_anime = false unless $game_switches[3] || $game_switches[169]
            end
          end
        end
      end

       

      This actually works 100% perfectly. Thanks so much!

    4. Kayzee

      Kayzee

      You are checking for the same switches twice though. You should change the...

      @last_step_anime = false unless $game_switches[3] || $game_switches[169]

      ...line to use another switch since you want both switch 3 and 169 to force the animation on. That line is for checking a switch to check if you want the animation to stay on if it's already on but not turn it on if it isn't you see?

       

      Edit:  You know, this isn't important at all, but that whole step animation thing suddenly reminds me of a little script I made for my game. It made it so if the player stops moving for a bit they start walking in place. I just kinda strikes me as funny that I have made a script before that did the exact opposite that this wall bump one did. XD

  21. UncannyBoots

    Vehicle that can pass through certain impassible tiles

    I use that already but it doesn't restrict vehicles only. Thanks though! @Kayzee, it works perfectly. I actually edited the script almost exactly like that but it didn't work and I had no idea why. Turns out the parenthesis were what I was missing, and I never would have figured that out lol. Also I used || instead of && so I dunno which of those differences is what made it not work. But it works now, so yeah thanks a ton!
  22. UncannyBoots

    Vehicle that can pass through certain impassible tiles

    I don't mean to be much of a bother but I just realized that now the vehicle can go into water, which I do not want. The water is marked with a region id, making it so that the player can swim in it. How would I make it so that when riding the vehicle, the player cannot pass over a specific region ID?
  23. UncannyBoots

    Vehicle that can pass through certain impassible tiles

    That would make the player be able to pass over every tile. I don't want that, I want the vehicle to only pass over certain specified tiles, not over walls and things like that. Still, thank you for your help! EDIT: I misread it, that actually would work in theory (I think) but it would take a lot more work. Regardless, thanks for taking the time to help me :) Hey, it works. Thank you! I got a few error messages at first but I was able to fix them. The alias was just a bit messed up. Here's the fix: class Game_Player < Game_Character alias :map_passable_buggy_base map_passable? def map_passable?(x, y, d) case @vehicle_type when :boat $game_map.passable?(x, y, d) || $game_map.terrain_tag(x, y) == 1 else map_passable_buggy_base(x, y, d) end end end Hmm, actually wouldn't the alias also not even be called there? Iirc, you have to then call the alias under the def, right? So like this: alias :map_passable_buggy_base map_passable? def map_passable?(x, y,d) :map_passable_buggy_base Well either way, the script works but yeah
  24. Spending a lot of time and effort into making an RPG Maker game is perhaps more painful than working in other game engines, because you just know that most everyone is going to look down on the game for being made in an "easy" "cookie cutter" engine. The game is overall going to be less exciting than the average Unity platformer or Unreal adventure game or Game Maker game, less respected than even a Ren'Py visual novel. And therefore less chance of all the work paying off beyond my own satisfaction, and ultimately my own regret.

    1. Show previous comments  2 more
    2. Kayzee

      Kayzee

      All I am saying is, it's only a waste if you think it is. If you are mostly dreaming about "making it big" so to speak, then yeah, it will probobly all go to waste. I mean, you could make it big. Possibly. Not likely but possibly. Maybe taking that small chance is enough to make it worth it to you on it's own for now, but that kind of motivation tends to dry up after a while don't you think? However, if you have the itch to do it for it's own sake then it will never be a waste now will it? :3

    3. Animebryan

      Animebryan

      If you're serious about getting into serious game development, RPG Maker is a great stepping stone to get your foot in the door into map designing, database management & story telling. Plus, the events themselves let you understand basic programming logic as the ruby/java script is openly viewable for you to study. You can just decide which programming language you want to learn, such as java/script, python, C/++, etc., and eventually start programming your own game making engine, assuming of course you have the learning capacity & time & also money to do so.

    4. Kayzee

      Kayzee

      @Animebryan In the immortal words of Heath Ledger's version of the Joker: "Why so serious?" :P

       

      I mean, you aren't wrong, but no matter how serious you may be I think if all you are looking for is to get your foot in the door so you can go on to bigger and better things it becomes more of a paint by numbers thing then a real creative endeavor. It makes it much easier to burn out at an apparent lack of success and harder to be invested in what you are actually doing.

  25. And that includes all of the scripts recovered in this thread?
×