Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Persistent stats after battle

A topic by Konya Biyori created Oct 01, 2023 Views: 152 Replies: 1
Viewing posts 1 to 2

As the project is, the stat changes don't take effect outside of battle. Any hp/mp lost or exp gained doesn't actually carry over. Any changes I make outside of battle still work; I can give the charas more hp/mp from a quest or in a shop for instance and they'd go into the fights with that, but I'm not sure how to go about having the changes during the battle be persistent after. Unless they're supposed to be and I messed up somewhere. 

Anyone know of any good ways to go about doing this? It would just be for the player charas and not the enemies. Referring to the player charas specifically seems to work, global.party[0].hp instead of _User.hp or _Targets.hp, but that's probably a bit messy so I wanted to check before tweaking everything for that kind of solution. Just incase I'm missing a really simple answer.

Hello Konya Biyori! I was looking at your question, and I managed to create a function in the "Battle Functions" script where I updated the stats on global.party from the 'current stats' from the oBattle.partyUnits array. 

After coding the function, I added a call to the function when oBattle is destroyed to ensure that the stats are kept for the next battle. Please let me know if you need more info to execute this.


Best,

Osvaldo (Kikilo)