I needed a larger player collision for my own project. Through searching, I found this solution script from Shaz for supporting larger sprite collisions on the player:
I figured it would be a good learning experience for me to try to add in the event activation, so I wrote up my own script to expand it. Thanks Shaz for making the original script for me to learn from!
# Modify event triggering to take into account wider players# Requires Shaz's Event/Player Resize script to be useful,# without it the script will crash.# Script by darkgriffin, special thanks to Shaz's script# for showing me a good way to handle multiple tile activation# Free for commercial or non-commercial use, please credit.## Extends the Game_Player class, editing the way events# are triggered. Instead of checking a single space in front# of the player, an entire row based on their width is checked# if they are set to be wider or taller then the default player# size. Use Shaz's event command to change the size, this# script simply reads off the variables created in Shaz's script.###########################################################class Game_Player < Game_Character #-------------------------------------------------------------------------- # * Determine if Front Event is Triggered #-------------------------------------------------------------------------- alias dg_check_triggers_fat_triggers check_event_trigger_there def check_event_trigger_there(triggers) #run normal trigger checking dg_check_triggers_fat_triggers(triggers) #also check more spaces ahead if the player collisions are # bigger then a single tile if (@collide_x > 0 && [2,8].include?(@direction)) || (@collide_y > 0 && [4,6].include?(@direction)) check_fat_event_trigger(@direction,@x,@y,triggers) end end def check_fat_event_trigger(d,x,y,triggers) # d : @direction(2,8,4,or 6) # x : player x # y : player y #set up variables for creating an activation array @xfat1 = 0 @xfat2 = 0 @yfat1 = 0 @yfat2 = 0 #case check the direction player is facing case d when 2 # 2 is down xfat1 = x - @collide_x xfat2 = x + @collide_x yfat1 = y + 1 yfat2 = y + 1 when 8 # 8 is up xfat1 = x - @collide_x xfat2 = x + @collide_x yfat1 = y - 1 - @collide_y yfat2 = y - 1 - @collide_y when 4 # 4 is left xfat1 = x - @collide_x xfat2 = x - @collide_x yfat1 = y - @collide_y yfat2 = y when 6 # 6 is right xfat1 = x + @collide_x xfat2 = x + @collide_x yfat1 = y - @collide_y yfat2 = y end #loop through all tiles in selection, and activate # events, stopping if one is found. (xfat1..xfat2).each do |xf| (yfat1..yfat2).each do |yf| start_map_event(xf,yf,triggers,true) if ($game_map.any_event_starting?) break end end if ($game_map.any_event_starting?) break end end endend
This needs to be inserted with Shaz's script from the link in a slot above it, and then this add on directly below it.
So far it only supports the regular action button pressed triggers. (The "look at" or "talk to" command input.)
I think the same "build a trigger area and then activate it" methods could be done to handle "on step" triggers too. I wanted to get this out there before I break it again though.
It does work with the "Fat events" that Shaz's script makes if you tag an event as having larger collisions. Large 3x3 player's corners can trigger the Large event's corner. So you can have dragon player talk to dragon best friend.
It won't trigger multiple events, once it finds one to trigger in the area, it won't trigger any others. This is the same behavior as the normal event triggering from RPG Ace.
Future features I'm planning on trying to add, once I understand more about how to do them. I need these for my own project, so I figure there's no reason not to share once I crack them:
1 - support on step event triggers in the whole area of the player. (Probably with the same "only trigger one event" logic to make things like multiple tile map jump events not trigger all three stepped on events). Currently only the middle of the player triggers step events.
2 - support for counter flagged tiles, reaching the size of the large sprite areas. (So a 3x3 sprite should reach 3 extra counter tiles, or a total of 4 to mimic the smaller player behavior in the default game.) Not entirely sure how to pull this one off yet. I'll have to check each row for potential counter tiles before just passing back a no. Currently I can think of a few solutions but they all involve some pretty ugly long loops.
Anyway, I mostly wanted to post this to share what I have done so far, and maybe get some advice how I could do the above features.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.