04-06-2014, 02:25 PM
Hey guys this is my first time using globalvarints and I am just confused of how to sue them or when, So in this particular map, you pickup a jar of acid and in that function I made this
Now when that happened a script box is supposed to be active now in another map since I made this in that code for the other map
But it still doesn't work do you guys know what's the problem here or am i just stupid cause this is my first time using globalvarints and I might not do a good job at it! so eyah, am I supposed to put something onstart?
IDK tell em down in the comments, thnx.
PHP Code:
void CleanContainer(string &in asEntityName, string &in asType)
{
AddPlayerSanity(2);
PlayMusic("02_puzzle.ogg", false, 0.7f, 0.5f, 9, false);
SetEntityActive("AreaSpawn", true);
SetGlobalVarInt("GotJarofAcid", 1);
}
Now when that happened a script box is supposed to be active now in another map since I made this in that code for the other map
PHP Code:
void CheapScare(string &in asParent, string &in asChild, int alState)
{
//If you got the jar of acid
if(GetGlobalVarInt("GotJarofAcid")==1)
{
SetEntityActive("AreaCheapScare", true);
}
SetGlobalVarInt("GotJarofAcid", 1);
}
//A function when looking at the Suitor
void SanityDamage(string &in asEntity, string &in asType)
{
SetEntityActive("enemy_suitor_1", true);
FadeEnemyToSmoke("enemy_suitor_1", true);
}
But it still doesn't work do you guys know what's the problem here or am i just stupid cause this is my first time using globalvarints and I might not do a good job at it! so eyah, am I supposed to put something onstart?
IDK tell em down in the comments, thnx.