Actually, my job system works fine, I just want to make jobs exclusive to different actors. So I added a 'user'=>1 to the array, so I ended up with something like:
and it works fine. But later on when making the list of jobs to display on Scene_Professions, I did: (note: I'm not pasting the entire class)
And so on and so forth. I put the else in there just so it'd be able to make a window if the if statement failed.. which it has. $game_party.job_ad is an array of jobs that are available, so y should be the same thing. y should be just one job, then (which it is since @job_list.push(y[1]) works fine and is displays in my Scene_Professions the way I want.
The problem is, no matter if i use @actor.id or 3 or @actor_id, the if doesn't work and I get a million Scouts in my window. Does anyone know what I'm doing wrong?
Code:
Jobs = [
{'name'=>"Scout", 'user'=>1,
'max_lvl'=>5, 'lvl1'=>10, 'lvl2'=>30, 'lvl3'=>58, 'lvl4'=>98, 'lvl5'=>189,
'HP'=>30,'SP'=>0,'STR'=>5,'DEX'=>10,'INT'=>0,'AGI'=>10,
'job_needed'=>nil, 'lvl_needed'=>nil, 'gender'=>'Male',
'desc'=>"Scout"
}
]
Code:
class Scene_Professions
def initialize(actor_pos)
@actor_pos = actor_pos
@actor = $game_party.actors[actor_pos]
end
def main
y = $game_party.job_ad.clone
@job_list = []
for i in 0...(y.size)
job = y[i]
if job['user'] == @actor.id
@job_list.push(y[i])
else
@job_list.push(y[0])
end
end
The problem is, no matter if i use @actor.id or 3 or @actor_id, the if doesn't work and I get a million Scouts in my window. Does anyone know what I'm doing wrong?