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.

{Resolved}Just a little tip: how to add stats via script???(like strenght)

Mililo

Member

Thats all on title I want for an example:
To add 1 strenght to the actor via script when he do the thing I want but it have to be the actor who do the thing, not a defined actor.
Cya
 

boon

Sponsor

Sorry? Could you touch up your question, because I don't really understand. Do you want to know how to add 1 skill point in Strength when the actor does an event or presses something?
 

khmp

Sponsor

Code:
$game_party.actors[party_position].str += n
$game_party.actors[party_position].dex += n
$game_party.actors[party_position].int += n
$game_party.actors[party_position].agi += n

party_position is the index of which actor in your party you would like to change the statistics of. For example the party leader would be index 0, the next member closest to the leader would be 1, and so on until $game_party.actors.size - 1. The default being 4 - 1.

n is the number you would like to add to a particular statistic.

Good luck with it Mililo! :thumb:
 

Mililo

Member

khmp
Very ty that's almost what i wanted but now i saw that more than that u can just do if I show u exactly what I want so that's perfect, thanks.

Topic
My problem is solved(almost, but i give my way) so no more help needed.
 

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