OK, Im using SimpleSnow 1.0 and I have this problem with a function that decrements a slider by 1 every 100 game cycles. I think they interfere since they both are repeatedly executed by rep_execute. Here is my code:
//in rep_execute
int counter = 0;
int player_inwater = 1;
int player_air = 100;
if(player_inwater == 1){
if (counter < 99)
counter++;
else
{
player_air--;
sliderone.Value = player_air;
counter = 0;
}
}
Is this wrong? ???
EDIT: Never mind, just had to use timers instead to bypass the Module's rep_execute function.
If you're actually defining your variables inside of rep_ex they 1) won't exist outside of rep_ex, and 2) will be initialized every time rep_ex is called (every game loop).
Move your:
int player_inwater =1;
int player_air = 100;
Lines outside of rep_ex.
Right, you shouldn't need to "bypass the Module's rep_execute function". Every module, the global script and each room can have their own independent repeatedly_execute(_always) functions.
I must have forgotten that you have to declare ints outside of functions. Thanks guys. :)
EDIT: Never mind again. I had to declare it in my global script first. :)