Marin is this the v1.6 script we are looking for? I asked in October 19th but you didn’t reply.I don't have v17 versions of my scripts anymore, as I overwrote those files. I'll see if my GDrive backed this particular script up, but that'll be an exception.
def screen_y
ret = screen_y_ground # new - required for v18.1 jump mechanic
real_y = @real_y
if on_stair?
if @real_x / Game_Map::X_SUBPIXELS.to_f <= @stair_start_x * Game_Map::TILE_WIDTH &&
@stair_end_x < @stair_start_x
distance = (@stair_start_x - @stair_end_x) * Game_Map::REAL_RES_X -
2.0 * @stair_begin_offset * Game_Map::X_SUBPIXELS
rpos = @real_x - @stair_end_x * Game_Map::REAL_RES_X - @stair_begin_offset * Game_Map::X_SUBPIXELS
fraction = 1 - rpos / distance.to_f
if fraction >= 0 && fraction <= 1
diff = fraction * (@stair_end_y - @stair_start_y) * Game_Map::REAL_RES_Y
real_y += diff
if self.is_a?(Game_Player)
if SMOOTH_SCROLLING
@view_offset_y += diff - (@stair_last_increment || 0)
else
$game_map.scroll_down(diff - (@stair_last_increment || 0))
end
end
@stair_last_increment = diff
end
if fraction >= 1
endy = @stair_end_y
if @stair_end_y < @stair_start_y
endy -= @stair_y_position
else
endy -= @stair_y_position
end
@y = endy
@real_y = endy * Game_Map::REAL_RES_Y
@view_offset_y = 0 if SMOOTH_SCROLLING && self.is_a?(Game_Player)
clear_stair_data
return stair_screen_y
end
elsif @real_x / Game_Map::X_SUBPIXELS.to_f >= @stair_start_x * Game_Map::TILE_WIDTH &&
@stair_end_x > @stair_start_x
distance = (@stair_end_x - @stair_start_x) * Game_Map::REAL_RES_X -
2.0 * @stair_begin_offset * Game_Map::X_SUBPIXELS
rpos = @stair_start_x * Game_Map::REAL_RES_X - @real_x + @stair_begin_offset * Game_Map::X_SUBPIXELS
fraction = rpos / distance.to_f
if fraction <= 0 && fraction >= -1
diff = fraction * (@stair_start_y - @stair_end_y) * Game_Map::REAL_RES_Y
real_y += diff
if self.is_a?(Game_Player)
if SMOOTH_SCROLLING
@view_offset_y += diff - (@stair_last_increment || 0)
else
$game_map.scroll_down(diff - (@stair_last_increment || 0))
end
end
@stair_last_increment = diff
end
if fraction <= -1
endy = @stair_end_y
if @stair_end_y < @stair_start_y
endy -= @stair_y_position
else
endy -= @stair_y_position
end
@y = endy
@real_y = endy * Game_Map::REAL_RES_Y
@view_offset_y = 0 if SMOOTH_SCROLLING && self.is_a?(Game_Player)
clear_stair_data
return stair_screen_y
end
else
clear_stair_data
end
# elsif jumping?
# n = (@jump_count - @jump_peak).abs
# return (real_y - self.map.display_y + 3) / 4 + Game_Map::TILE_HEIGHT -
# (@jump_peak * @jump_peak - n * n) / 2
# end
# Edit start
elsif jumping?
if @jump_count > 0
jump_fraction = ((@jump_count * jump_speed_real / Game_Map::REAL_RES_X) - 0.5).abs # 0.5 to 0 to 0.5
else
jump_fraction = ((@jump_distance_left / @jump_distance) - 0.5).abs # 0.5 to 0 to 0.5
end
ret += @jump_peak * (4 * jump_fraction**2 - 1)
end
if jumping?
return ret
end
#
return (real_y - self.map.display_y + 3) / 4 + (Game_Map::TILE_HEIGHT)
end
end
Came here to see if there was any fix for this. I’ll try it later! CheersHello, I made a fix for this script for version 18.1. The newest version of essentials changed how jumps work, and this script thus overwrote the new jump method, causing the player to glide over ledges.
This script change starts at around line 507, with "def screen_Y":
Ruby:def screen_y ret = screen_y_ground # new - required for v18.1 jump mechanic real_y = @real_y if on_stair? if @real_x / Game_Map::X_SUBPIXELS.to_f <= @stair_start_x * Game_Map::TILE_WIDTH && @stair_end_x < @stair_start_x distance = (@stair_start_x - @stair_end_x) * Game_Map::REAL_RES_X - 2.0 * @stair_begin_offset * Game_Map::X_SUBPIXELS rpos = @real_x - @stair_end_x * Game_Map::REAL_RES_X - @stair_begin_offset * Game_Map::X_SUBPIXELS fraction = 1 - rpos / distance.to_f if fraction >= 0 && fraction <= 1 diff = fraction * (@stair_end_y - @stair_start_y) * Game_Map::REAL_RES_Y real_y += diff if self.is_a?(Game_Player) if SMOOTH_SCROLLING @view_offset_y += diff - (@stair_last_increment || 0) else $game_map.scroll_down(diff - (@stair_last_increment || 0)) end end @stair_last_increment = diff end if fraction >= 1 endy = @stair_end_y if @stair_end_y < @stair_start_y endy -= @stair_y_position else endy -= @stair_y_position end @y = endy @real_y = endy * Game_Map::REAL_RES_Y @view_offset_y = 0 if SMOOTH_SCROLLING && self.is_a?(Game_Player) clear_stair_data return stair_screen_y end elsif @real_x / Game_Map::X_SUBPIXELS.to_f >= @stair_start_x * Game_Map::TILE_WIDTH && @stair_end_x > @stair_start_x distance = (@stair_end_x - @stair_start_x) * Game_Map::REAL_RES_X - 2.0 * @stair_begin_offset * Game_Map::X_SUBPIXELS rpos = @stair_start_x * Game_Map::REAL_RES_X - @real_x + @stair_begin_offset * Game_Map::X_SUBPIXELS fraction = rpos / distance.to_f if fraction <= 0 && fraction >= -1 diff = fraction * (@stair_start_y - @stair_end_y) * Game_Map::REAL_RES_Y real_y += diff if self.is_a?(Game_Player) if SMOOTH_SCROLLING @view_offset_y += diff - (@stair_last_increment || 0) else $game_map.scroll_down(diff - (@stair_last_increment || 0)) end end @stair_last_increment = diff end if fraction <= -1 endy = @stair_end_y if @stair_end_y < @stair_start_y endy -= @stair_y_position else endy -= @stair_y_position end @y = endy @real_y = endy * Game_Map::REAL_RES_Y @view_offset_y = 0 if SMOOTH_SCROLLING && self.is_a?(Game_Player) clear_stair_data return stair_screen_y end else clear_stair_data end # elsif jumping? # n = (@jump_count - @jump_peak).abs # return (real_y - self.map.display_y + 3) / 4 + Game_Map::TILE_HEIGHT - # (@jump_peak * @jump_peak - n * n) / 2 # end # Edit start elsif jumping? if @jump_count > 0 jump_fraction = ((@jump_count * jump_speed_real / Game_Map::REAL_RES_X) - 0.5).abs # 0.5 to 0 to 0.5 else jump_fraction = ((@jump_distance_left / @jump_distance) - 0.5).abs # 0.5 to 0 to 0.5 end ret += @jump_peak * (4 * jump_fraction**2 - 1) end if jumping? return ret end # return (real_y - self.map.display_y + 3) / 4 + (Game_Map::TILE_HEIGHT) end end
Hi, first time actually using the forum, be patient with me.Will this work with v19.1?
alias stair_cetc check_event_trigger_touch
def check_event_trigger_touch(x,y)
return if on_stair?
return stair_cetc(x,y)
end
check_event_trigger_touch(@x, @y)
(@x+1,@y ) -> (6)
(@x ,@y+1) -> (2)
(@x-1,@y ) -> (4)
(@x ,@y-1) -> (8)
So, what would I set the values to in this scenario? I tried setting the width value to "x/4", but that just regards the cliff tile as a slope tile as well.Oh, I think the issue is that you're thinking of the width of the staircase from the character's perspective, but it's supposed to be the width the stairs are taking on the map itself. So like, it's not supposed to be this
View attachment 6791
It's supposed to be this:
View attachment 6790
It should still be out of 3, because it starts at 0.So, what would I set the values to in this scenario? I tried setting the width value to "x/4", but that just regards the cliff tile as a slope tile as well.
For some reason I'm having issues where i'm getting stuck on one of the stair tiles, but only when going down it from its corresponding tile on higher up.
This is what the event looks like
It's the same as the event next to it, just 2/3 instead of 1/3 or 0/3
I cannot tell you how great your timing was. I was using a version of Marin's v18 one with Damparo's fix but I didn't realize Screedledude did a fix for the jumping and I was tearing my hair out trying to figure out why I couldn't jump over ledges! Thank you for posting this and packaging it all together nicely >.<Version for v19.1, basically just v17 with Screedledude's fix for jumping and Damparo's fix for the event triggers. (Although I made it refer to @direction instead of constants, just in case)
Haha, it's funny that you say that, because I was starting with just Screedledude's fix and almost did Damparo's from scratch before I saw it here! Seems everyone's got each other's back with this script!I cannot tell you how great your timing was. I was using a version of Marin's v18 one with Damparo's fix but I didn't realize Screedledude did a fix for the jumping and I was tearing my hair out trying to figure out why I couldn't jump over ledges! Thank you for posting this and packaging it all together nicely >.<