Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Quick & simple syntax question

Status
Not open for further replies.
Code:
$scene = Scene_Skill.new($game_party.actors[0]) # initializes Scene_Skill with the first actor of the database (ID: 0)

You might also grab the actor from a variable like you did in your example, making the system more variable if you need this:
Code:
@actor = $game_party.actors[0] # stores the first actor of the database (ID: 0) in @actor
$scene = Scene_Skill.new(@actor) # initializes Scene_Skill with the actor ID held by @actor
Remember that you only need this if you have multiple actors accessing Scene_Skill, and you'd need to alter the @actor= part as well, as you need to assign multiple actors to it. Look into the default Scene_Menu for an example.
 
You have both failed :p the real call to this is

$scene = Scene_Skill.new(actor_index)

where actor_index is the party member you want to call it for

For example

$scene = Scene_Skill.new(0)

will call it for the first actor in party

the
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top