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)
endCode:
def initialize(2)
super()
setup(2)
endSo when I said the syntax read as
Code:
$game_party.actors[actor_index].skillpoints += valueSo if you ONLY want to apply points to the lead party member, use...
Code:
$game_party.actors[0].skillpoints += 4
![[Image: QrnbKlx.jpg]](https://i.imgur.com/QrnbKlx.jpg)
![[Image: sGz1ErF.png]](https://i.imgur.com/sGz1ErF.png)
![[Image: liM4ikn.png]](https://i.imgur.com/liM4ikn.png)
![[Image: fdzKgZA.png]](https://i.imgur.com/fdzKgZA.png)
![[Image: sj0H81z.png]](https://i.imgur.com/sj0H81z.png)
![[Image: QL7oRau.png]](https://i.imgur.com/QL7oRau.png)
![[Image: uSqjY09.png]](https://i.imgur.com/uSqjY09.png)
![[Image: GAA3qE9.png]](https://i.imgur.com/GAA3qE9.png)
![[Image: 2Hmnx1G.png]](https://i.imgur.com/2Hmnx1G.png)
![[Image: BwtNdKw.png%5B]](https://i.imgur.com/BwtNdKw.png%5B)