After a week or two working on the Game_Actor class, I have come to find one great disturbing factor... As I have previously mentioned, my game is using a recruit method, where class_id and level are part of Game_Actor's setup method.
Apparently, that just isn't working...In Game_Actors I replaced this code:
if @data[actor_id] == nil
@data[actor_id] = Game_Actor.new(actor_id)
end
With a similar code only with Game_Actor.new(actor_id, 1 , 1). This is supposed to say if data does not exist for this actor, make a new default one. I think...
Well, anyhow, when I use the script code
Game_Actor.new(2, 2, 15)
, which should create a new actor with ID: 2, Class_id: 2, and level: 15, I then refer to its level with $game_actors[2].level, and it returns 1....
It would seem no matter what I do, it's returning its data as nil...So what on earth am I supposed to do...I suppose I just don't understand how Object.new works even thought I would have thought it simple
I have the daunting feeling I'm gonna have to start all over... :'( *sigh*
Any ideas as to what I should do to...idk...make it so I can create a new actor with its class and level specified in its setup?
EDIT: I tried making its @data = a new recruit with the specified arguments inside the Game_Actor class...but ofc the "Stack level is too deep"... jeeeez