Frictional Games Forum (read-only)
No Working Scripting - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: No Working Scripting (/thread-6750.html)



No Working Scripting - toni1998 - 02-28-2011

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


RE: No Working Scripting - Tottel - 02-28-2011

Add an extra

}

to close your function.


RE: No Working Scripting - toni1998 - 02-28-2011

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


RE: No Working Scripting - Tottel - 02-28-2011

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.


RE: No Working Scripting - toni1998 - 02-28-2011

as do the direct, as I write?


RE: No Working Scripting - Tottel - 02-28-2011

AddPropImpulse("Armor1", 0, 0, -3, "World");

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