07-04-2011, 05:52 PM
I have script that we must put three wheels to machine after my next function must show message if GetLocalVarInt = 3. Of course don't show
Code:
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "Plax", true, 1);
AddEntityCollideCallback("cogwheel_tiny01_4", "StickyArea_3", "CollideWheel", false, 1);
AddEntityCollideCallback("cogwheel_tiny01_5", "StickyArea_1", "CollideWheel", false, 1);
AddEntityCollideCallback("cogwheel_tiny01_6", "StickyArea_2", "CollideWheel", false, 1);
}
void CollideWheel(string &in asParent, string &in asChild, int alState)
{
AddLocalVarInt("asChild", 1);
PlaySoundAtEntity("", "impact_metal_low", "Player", 0.05f, false);
}
void StartSectionDead(string &in asChild, int alVal)
{
if(GetLocalVarInt("asChild") != 3) {
SetMessage("Journal", "Slime", 0);
}
}