03-04-2015, 04:09 AM
When someone describes the syntax of a statement, they include parameter values that are replaced. Even the default scripts work like that. So the 'Game_Actor' initialize method in the default scripts that read:
... When you load the 2nd actor, the value of actor_id is set to the value 2. When RPGMaker XP passes the value of 2 into the method 'using' the actor_id value as a placeholder, it treats the method as...
So when I said the syntax read as
.... you replace both the 'actor_index' value with 0 and the value applied.
So if you ONLY want to apply points to the lead party member, use...
(where this one is applying 4 points)
Code:
def initialize(actor_id)
super()
setup(actor_id)
end
Code:
def initialize(2)
super()
setup(2)
end
So when I said the syntax read as
Code:
$game_party.actors[actor_index].skillpoints += value
So if you ONLY want to apply points to the lead party member, use...
Code:
$game_party.actors[0].skillpoints += 4