Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # ACTION CHAIN ADD-ONS
- #------------------------------------------------------------------------------
- # Warning, only for advanced users!
- #
- # You can now create add-ons for the chain interpreter.
- # The format is:
- # if action[0]=="name of the command"
- # code to be done.
- # action[1], action[2], etc contain the parameters
- # to add a condition, do
- # @action_conditions.push(@chain_index)
- # in case the condition failed.
- # end
- #==============================================================================
- class Scene_Battle < Scene_Base
- alias custom_extension_interpret_action interpret_action
- def interpret_action(action, item)
- return false if !custom_extension_interpret_action(action, item)
- #example interpretation add-ons
- #this example interpretation prints 'hello, name' with name being the
- #first parameter
- if action[0]=="say_hello"
- p "hello, "+action[1]
- end
- #This example interpretation acts as condition. if switch3 isn't true
- #it skips its block
- if action[0]=="if_switch3"
- if !$game_switches[3]
- @action_conditions.push(@chain_index)
- end
- end
- #Add here your interpretations
- #Don't delete this!
- return true
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment