K
Kaji_Ikaraseru
Guest
This is probably an easy fix but I can't figure out how to do it. I have a stats object for my character, and when the weapon sprite is sprite_sword_3 I want it to add stats to the player.
The problem is that since the sprite is there the whole time I have it equipped, it adds the stats, meaning maxhp will continue increasing by one the whole time. How can I make it so that it only adds once and when I take it off it reduces the stats?
Code:
if instance_exists(obj_player){
if obj_player.weapon_sprite == spr_sword_3 {
maxhp += 1;
maxstamina += 10;
maxmana += 2;
attack += 1
}
}