I'm just trying to change a simple object's variable from within my script. The code runs but does nothing to change the variable.
Editing this variable should lower the enemy's health bar, but it does not. If I edit this variable from within the object itself the healthbar changes.
enemies();
friends();
randomize();
//get enemy from array and make an instance
active_enemy = enemy_list[irandom_range(0, 1)];
var inst1 = instance_create_depth(200, 75, 1, active_enemy);
//get friend from arrayand make an instance
active_friend = friend_list[irandom_range(0, 1)];
var inst2 = instance_create_depth(96, 175, 1, active_friend);
//change variable
inst1.e_health_active = 1;
This script is placed in the battle room creation code and e_health_active is in every enemy obj code as part of their stats.
Thanks!