i've been trying to get my XGrid script done for Nexis Core and i've been having some problems in it, 2 problems infact
my first problem is with this script
class Xgrid
def initialize
@check = []
@check[2] = 1
end
def check_active(id)
return @check[id]
end
end
class Scene_Map
alias update_first_1 update
def update
update_first_1
if $game_switches[7] == true
# Sets Event Graphics
for event in $game_map.events.values
if $xgrid.check_active(event.id) == 1
$game_map.events[event.id].turn_left
#p "chnaged"
elsif $xgrid.check_active(event.id) == 0
$game_map.events[event.id].turn_down
end
end
end
end
end
the above is a test script i've been running outsidemy project, how it works is that when your on a map, if Switch 7 is true, then go though every event checking what value check_active(), if the return value is 1 then the even turns left, if its 0 then it turns down
the idea is that switch 7 only goes to true when your in a map that i want the events to be checked like this, ie, the XGrid and those events work differently than any other event,
now the problem is that $game_
map.events[ID].turn_left isn't working, the commented line fires off when i have it uncompensated but event 2 (the one marked as 1 in the XGrid class @check array, i now that .turn_left and .turn_down works cause i used them in call_script with an event but i couldn't get them to work in an Auto-Start or Parallel Process event so i then tried this
----------------------------------------------------------------------
the second problem is that i want a window to appear on screen like a HUD when a variable is true (i can create a separate system for switching the value of the variable later) the but when i alias update in Scene_Map i cant seem to work out how to create the window without it being recreated all the time (and that normally starts to slow down the game very quickly) and i need it created before the check if the variable is true cause if it isn't the window is disposed and obviously there'll be an error if the variable isn't the right data type (instance of Window_Base), i even tried aliasing main in Scene_Map but the window only showed up when the variable is true after i went into like the menu, i know how to put text in and all but the initial creation is stumping me, how do i get this window created