Follower Jump Command Fix (or F.J.C.F. for short.)
I took the liberty of going on a wild goose chase searching for a fix to this problem, and have made it into a script anyone can easily find. "Galv" is the original creator, but has not posted this helpful snippet as a script. I would assume it's because it's too short. Other credits go to "Kev" for fixing the original code snippet, which was broken by the website due to updates. Now this script fixes a small issue/oversight with the "jump" command, where it will only affect your character and NOT player followers, thus companions phasing through walls. This script fixes that by making the player's followers jump along with the player when the jump command is used. That is all. Happy Rpg-making!Code:
#==============================================================================
#-------Galv's Follow Jump Fix-------
#
# -- Game Engine: Rpg Maker VX Ace
#
#
# -- Version 1.0
#
#
# <Explanation>
#
# -- This script fixes an oversight in the ace engine where if you have
# -- multiple followers, and you use the "Jump" Command, they just phase
# -- through the wall. WELL TO THAT I SAY, BEGONE GHOSTS! This script fixes
# -- it so that your follows will ALSO jump along with your character!
# --
# -- Happy platform making!
#
# -- Sincerely,
# -- Lava
#
#<Credits>
#
# -- Credits go to "Galv", for making the snippet in the first place,
# -- "Kes", for undoing the errors made by the site. The name's "Lavalord96".
# -- All I did was go on a wild goose chase to find this fix, and put in
# -- proper credit, to the people that deserve it. I hope no vx ace user has
# -- to bear going and searching for this simple fix ever again lmao.
#
# <Instructions>
#
# -- Step 1: Place below materials, and above main, but DO NOT TRY TO PASTE
# -- THIS IN ANYWHERE ELSE OR IN OTHER LINES OF CODE, I KNOW THAT SOUNDS
# -- OBVIOUS, BUT FOR THE LOVE OF GOD AND ALL THAT IS HOLY JUST DON'T IT'S
# -- JUST EASIER THIS WAY, NO MATTER HOW SHORT IT LOOKS, IT JUST
# -- DOESN'T WORK ASADSNUDWBHJKRFBHBDF.
# -- Step 2: Profit; No more followers phasing though solid objects!
#
#
#==============================================================================
class Game_Player < Game_Character
def jump(x_plus, y_plus)
super
@followers.each { |f| f.jump(@x - f.x, @y - f.y) }
end
end
本贴来自国际rpgmaker官方论坛作者:lavalord96处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/follower-jump-command-fix-or-f-j-c-f-for-short.153499/
页:
[1]