I was curious as if there is a way to make a certain variable work if there are enemies on the map?
I mean I have it set up to where you gain a little bit of sanity if there are no enemies on the map but if there are then it flips on a switch that causes the sanity to slowly decrease.
Only problem is I get some error with doing it through two common events.
$game_variables[4] = $game_map.enemies.size
I'm using this code which stores it in variable 4. And I have it checking to see if the enemies present are greater than or equal to 1 then flip on switch 2 but if equal to 0 then switch 1 is off.
Again it seems to be set up correctly in my head but the problem being that when I go to test it out the game hangs up on me. :/
Now should I have the script piece thats called inserted into a conditional branch or not?
any assistance is greatly appreciated. Thanks in advance.
And I'm not having any frame rate issues. Its just if I have a butt-load of enemies on the map then I get it. But other than that nothing.
ALSO!!!
Do I need to make a new page for the event to play the said item after it?
Because I have my events set up to give me sanity points but it should be set up to after they're dead if I remember correctly? But that doesn't seem to be the case so is there a special way of setting up this?
And I've RTFM in case.