05-07-2013, 03:45 PM
Hello
I want that when I turn a lever, there appear and disappear some Entities I want, I also want to add a sound. So it should look like that?
void OnStart()
{
??????("mechanismus2", "lever2", "????", true, false, 0);
}
void func2(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
lever2();
}
void lever2()
{
if(GetLocalVarInt("Var1") == 1)
{
PlaySoundAtEntity("", "explosion_rock_large.snt", "player", 0.5f, false);
GiveSanityBoostSmall();
SetEntityActive("wine02_1", true);
}
}
Or how do I script that? I don't get it. Please help
I want that when I turn a lever, there appear and disappear some Entities I want, I also want to add a sound. So it should look like that?
void OnStart()
{
??????("mechanismus2", "lever2", "????", true, false, 0);
}
void func2(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
lever2();
}
void lever2()
{
if(GetLocalVarInt("Var1") == 1)
{
PlaySoundAtEntity("", "explosion_rock_large.snt", "player", 0.5f, false);
GiveSanityBoostSmall();
SetEntityActive("wine02_1", true);
}
}
Or how do I script that? I don't get it. Please help