Edit: self.contents.draw_text(x, y, width, height, $data_skills[id].name)
The problem wasn't with how I was calling this, I was using contents.text_size to try to write the width and x value, but it couldn't convert the $data_skills[id].name into a fixnum to determine its size for some reason. Anyway, thanks for your time!
I want to write in skills into a menu i'm working on.
self.contents.draw_text(0, 0, 100, 32, ?!?!?!?)
I've not been able to figure out what to put in "?!?!?!?" to call a specific skill. Say... skill #2 in the database. Or... skill $game_variables[26] in the database.
Anyone mind helping me with this simple syntax problem?
THANKS ^_^
I can't remember what to use, but it's a good idea to check Window_Skill refresh method, it'll give you a clue ;)
yeah I've been rummaging through window_skills, and trieds $data_skills[id], but no dice so far.
I'll keep lookin' though.
Actually, let me dissect this further for ya'll, maybe you can brainstorm better than I.
In Window_Skill it uses this to draw the skill like I'm wanting to.
self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
So looking at "skill.name", .name is just a method for whatever "skill" is. They define skill like this in the current method.
So now I have to find what @data[index] does. In the refresh method they initialize @data with this.
And then create a loop which pushes items into the array based on what, I have to assume, is the actor's current skills.
for i in 0...@actor.skills.size
skill = $data_skills[@actor.skills[i]]
if skill != nil
@data.push(skill)
end
end
So it pushes skill into the array, @data, and then repeats for each interval of i.
skill = $data_skills[@actor.skills[i]]
Now I must analyze @actor.skills
and determine just what value this can be. Jumping back to the skill scene we find that @actor = $game_party.actors[@actor_index], so it is just a number, so I don't see why I wouldn't be able to just use $data_skills[id].name in self.contents.draw_text to write the skill....
*ponders*