[RMVX ACE] SELF VARIABLES

Posts

Pages: 1
Hello, I'm looking for a self variable script, wich each event would have its own variable, I saw one for MV but I'm currently using Ace, anyone can make it?
Marrend
Guardian of the Description Thread
21781
Off hand, I would say a "self-variable" variable might be it's own instance of Game_SelfSwitches. Like, you could make a script-call at the beginning of the game that reads...

$game_selfvariables = Game_SelfSwitches.new

...like so. Whenever you want to change a self-variable, you'd have to do something like...

map = $game_map.map_id
event = $game_map.event_id_xy(x, y)
# Capturing an event's ID is tricky. If you use the above, you have to know the coordinates of the event in question. You can
# also store the event's ID into a variable, and use that instead.
key = [map, event, 'A']
$game_selfvariables[key] = value
# Replace "value" with whatever.

...this. Though, this, by itself, doesn't make the data saveable. There's some functions in Data_Manager (self.make_save_contents and self.extract_save_contents?) that might need looking into.
SunflowerGames
The most beautiful user on RMN!
13323

It would require a common event that's a parallel process.
You would need to create all the variables by themselves.
Then you would need a script call (Because there is no option to choose event ID.)
And MAP ID too, which can be stored (But Event IDs reset after each map...)

Pages: 1