hey, i have a problem when trying to bypass a window from showing, ill show u what i mean,
so the config is like this:
#beging config
$map_name = "examplename.png"
$index0_name = "examplename.png"
$index1_name = ""
$index2_name = ""
then i have the C button to open a window depending where in the idex you are as so:
# if enter is being pressed
if Input.trigger?(Input::C)
if @index == 1
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to item screen
$scene = Scene_Index1.new
end
end
end
what i want is say $index1_name = "", i want it to not show the scene that its set up to show, so you have the option of showing a window, or not showing a window if theres no name there, iv tried multiple ways using:
# if enter is being pressed
if Input.trigger?(Input::C)
if $index1_name = ""
$scene = Scene_MapMenu.new (1)
else
if @index == 1
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to item screen
$scene = Scene_Index1.new
end
end
end
but no luck, iv tried mixing it up abit but cant find a solution :(
now i get the error "undefined local variable or method"
iv rearanged the script order as i want it to check the map index first to this:
def update
super
# if enter is being pressed
if Input.trigger?(Input::C)
if @index == 1
if index1_name == ""
$scene = Scene_MapMenu.new (1)
else
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to item screen
$scene = Scene_Index1.new
end
end
end
will i have to define index1_name anywhere?
Thats because you changed the variable.
Shouldn't it be
oops my bad, pesky little $ signs :P thanks man
bump, cba writing a new topic for summet small, is there a way to direct a super's settings as i did with the images, so its simply editable?
so my super is this:
i want it to be something like this
then have this in my editables
$window_size = (112, 64, 416, 352)
is it possible to implement this into the editables so you can do it up top rather than scroll through the whole script?
Super doesn't work that way at all. Super calls the parent's class "initialize" method. Look at this for example.
class Person
def initialize(name)
@name = name
end
end
class Billy < Person
def initialize
super("name")
end
end
Notice how class "Person" requires the argument "name". Any class that inherits the "Person" class must pass the super and the proper arguments. However, you can achievement what you want. You've just got it a little out of order.
$window_size = [x, y, width, height]
# rest of script
class Window_YourWindow < Window_Base
def initialize
super($window_size[0], $window_size[1], $window_size[2], $window_size[3])
end
end
cool, i did understand how super worked, but thought it could be simply redirected into editables, and thanks, your help is always appreciated :D