Frictional Games Forum (read-only)

Full Version: No Working Scripting
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello
I have a problem
My Script:

void OnStart()

{
AddEntityCollideCallback("Player", "AreaScare", "CollindeAreaScare", true, 1);
}

void CollindeAreaScare(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("Look1", 4, 100, "");
AddPropImpulse("Armor1", 0, 0, -3, "");
GiveSanityDamage(20, true);
StartPlayerLookAt("Look2", 4, 100, "");
AddPropImpulse("Armor2", 0, 0, -3, "");
GiveSanityDamage(20, true);
}

no working
please help me
Add an extra

}

to close your function.
void OnStart()

{
AddEntityCollideCallback("Player", "AreaScare", "CollindeAreaScare", true, 1);
}

void CollindeAreaScare(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("Look1", 4, 100, "");
AddPropImpulse("Armor1", 0, 0, -3, "");
GiveSanityDamage(20, true);
StartPlayerLookAt("Look2", 4, 100, "");
AddPropImpulse("Armor2", 0, 0, -3, "");
GiveSanityDamage(20, true);
}

still is not working
compressed air help me
Well, yes indeed. For one, you need to assign a coordinate system to your AddPropImpulse. This can either be "World" or "Local". You'll probably want to go for world to get a set basis.
as do the direct, as I write?
AddPropImpulse("Armor1", 0, 0, -3, "World");

Also, -3 is not a lot. Try higher values and make sure you're using the correct axis.