- Joined
- Apr 15, 2022
- Messages
- 116
- Reaction score
- 40
- First Language
- English
- Primarily Uses
- RMVXA
Hellu~
I'm using a very old script (2014) I found in google, I don't think the original creator is still online to ask it.
This script store the damage you take in a variable, now, the problem is that I don't get to understand in which variable is storing it:
Let's say my actor ID is 22, so (and I don't understand why to use this equation), so (22 - 1) * 3 + 1 (because actordamageidstart is 1) would be equal to V64, but that variable is always 0.
I'm using a very old script (2014) I found in google, I don't think the original creator is still online to ask it.
This script store the damage you take in a variable, now, the problem is that I don't get to understand in which variable is storing it:
Code:
ActorDamageIDStart = 1
# We want to remember the damage taken in variables too, do so here
index = (@actor_id - 1) * 3 + ActorDamageIDStart
# Remember this actor's last damage taken, override last value
$game_variables[index + 0] = @hp_damage_last
# Add to the cumulative turn damage here
$game_variables[index + 1] = @hp_damage_turn
# And add to the battle cumulative damage here
$game_variables[index + 2] = @hp_damage_battle
Let's say my actor ID is 22, so (and I don't understand why to use this equation), so (22 - 1) * 3 + 1 (because actordamageidstart is 1) would be equal to V64, but that variable is always 0.