I couldn't figure out where the global variables above the script you were talking about were, so I've set it up like so:
int happy;
int sad;
int angry;
SetGlobalInt (happy, Random(10));
SetGlobalInt (sad, Random(10));
SetGlobalInt (angry, Random(10));
if (GetGlobalInt (happy) <=5 && GetGlobalInt(sad)<=5){
SetGlobalInt (angry, Random(5)+5);
}
if (GetGlobalInt (sad) <=5 && GetGlobalInt(angry)<=5){
SetGlobalInt (happy, Random(5)+5);
}
if (GetGlobalInt (angry) <=5 && GetGlobalInt(happy)<=5){
SetGlobalInt (sad, Random(5)+5);
}
if (GetGlobalInt (angry) ==0){
SetGlobalInt (angry, (1));
}
if (GetGlobalInt (happy) ==0){
SetGlobalInt (happy, (1));
}
if (GetGlobalInt (sad) ==0){
SetGlobalInt (sad, (1));
}
I added a thing to try to prevent them from being zero at the end because I don't know of a more efficient way to do it just yet. Once I set up a whole crapload of these, we'll see if any of this affects any gameplay! Thanks for the help, guys.
int happy;
int sad;
int angry;
SetGlobalInt (happy, Random(10));
SetGlobalInt (sad, Random(10));
SetGlobalInt (angry, Random(10));
if (GetGlobalInt (happy) <=5 && GetGlobalInt(sad)<=5){
SetGlobalInt (angry, Random(5)+5);
}
if (GetGlobalInt (sad) <=5 && GetGlobalInt(angry)<=5){
SetGlobalInt (happy, Random(5)+5);
}
if (GetGlobalInt (angry) <=5 && GetGlobalInt(happy)<=5){
SetGlobalInt (sad, Random(5)+5);
}
if (GetGlobalInt (angry) ==0){
SetGlobalInt (angry, (1));
}
if (GetGlobalInt (happy) ==0){
SetGlobalInt (happy, (1));
}
if (GetGlobalInt (sad) ==0){
SetGlobalInt (sad, (1));
}
I added a thing to try to prevent them from being zero at the end because I don't know of a more efficient way to do it just yet. Once I set up a whole crapload of these, we'll see if any of this affects any gameplay! Thanks for the help, guys.