Here after someone asked me to help him in the CP luna command he wanted to be able to call common event so I wrote a method who call the common_event in the scene_Menu.
it's not modify any codes of CP {who already have the option to call method } it's intend to show to people who are not so good in programming HOW to call common_event with CP command
here's the codes
DISCLAIMER :
do not credit me this not necessary this only a tutorial the credit go to Neon Black not me
it's not modify any codes of CP {who already have the option to call method } it's intend to show to people who are not so good in programming HOW to call common_event with CP command
here's the codes
Code:
#==============================================================================
# ■ Luna Engine CP Commands Snipset "command_common_event"
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# little snipset to CP command for show how to add common_event calling
# Created by Nio Kasgami.
# Original Author Script : Neon Black {CP}
# requested by zeigfried_mcbacon
# Data : 2015/07/27
# Version : NA
# Require : NA
#==============================================================================
module CPLuna
module CampMenu
# the variable you want to use for call your common_event
Var_id = 1
COMMAND_WINDOW ={
# IT'S a EXAMPLE just copy past this command in the original and you will be able to use it
# it's will throw a error if just paste the method like that
# remove $test" or this will not appear to the people who wil play your game
:commands =>[
{
:push => 0,
:name => "common_event",
:icon => 368,
:type => 1,
:type_sym => :execute_common_event,
:actor_sel => false,
:nabl_type => 0,
:nabl_nabl_sym => nil,
:appear => "$TEST",
},
],
}
## Command Window
end
end
#==============================================================================
# ■ Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================
class Scene_Menu < Scene_MenuBase
#----------------------------------------------------------------------------
# ○ new method: call_common_event
#----------------------------------------------------------------------------
def execute_common_event
@id = $game_variable[CPLuna::CampMenu::Var_id]
$game_temp.reserve_common_event(@id)
return_scene
end
end
DISCLAIMER :
do not credit me this not necessary this only a tutorial the credit go to Neon Black not me