- Joined
- Mar 21, 2016
- Messages
- 32
- Reaction score
- 0
- First Language
- English
- Primarily Uses
Mining system (I can't find its original release place)
www.sendspace.com
I want the character to show the step animation when mining
After mining, it will return to its original state
def anime_step(x) copied from https://rpg.blue/thread-220484-1-1.html
alias _minerals_old_update comes from the mining system
Now there are two problems
1. Mining first, and then using the command "set moving route-step animation on", the command will be invalid
2. First use the "set movement route-step animation on" command, the character shows the step animation, and then go to mining,
After mining, the character's step status will be off and will not return to the original status (on)
Directly use events on the map to execute "set movement route-step animation on/off" and "set movement route-script-anime_step(0/1)" in different ways. It seems that there is no problem, so is it because I wrote the wrong part of update ??
Minerals!.rar (2.31MB) - SendSpace.com
Send, Receive, Track & Share Your Big Files with SendSpace file sharing!
I want the character to show the step animation when mining
After mining, it will return to its original state
def anime_step(x) copied from https://rpg.blue/thread-220484-1-1.html
alias _minerals_old_update comes from the mining system
Ruby:
class Game_Player < Game_Character
def anime_step(x)
if x == 0
begin
@step_anime = @old_step_anime
rescue
@step_anime = false
ensure
@old_step_anime = nil
end
else
if @old_step_anime == nil && @old_step_anime == nil
@old_step_anime = @step_anime
end
@step_anime = true
end
end
alias _minerals_old_update update
def update *args, &block
_minerals_old_update *args, &block
if is_mining?
anime_step(1)
elsif mining_complete?
anime_step(0)
end
update_mining if is_mining?
@mining.mine! if mining_complete?
visible_item_popups.each &:update
end
end
1. Mining first, and then using the command "set moving route-step animation on", the command will be invalid
2. First use the "set movement route-step animation on" command, the character shows the step animation, and then go to mining,
After mining, the character's step status will be off and will not return to the original status (on)
Directly use events on the map to execute "set movement route-step animation on/off" and "set movement route-script-anime_step(0/1)" in different ways. It seems that there is no problem, so is it because I wrote the wrong part of update ??

