Frictional Games Forum (read-only)
scrip help please - 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 - Development (https://www.frictionalgames.com/forum/forum-38.html)
+--- Thread: scrip help please (/thread-14466.html)

Pages: 1 2


RE: scrip help please - JetlinerX - 04-03-2012

Might want to do that...



RE: scrip help please - abe.lloyd - 04-03-2012

i dont know what to name things



RE: scrip help please - JetlinerX - 04-03-2012

What ever you want, just make sure they are the same name in the script.



RE: scrip help please - Musier - 04-03-2012

{
AddUseItemCallback("", "crowbar_1", "door_1", "UsedCrowbarOnDoor", true);
AddEntityCollideCallback("crowbar_joint_1", "crowbar_smash_01", "CollideAreaBreakDoor", true, 1);
}

void UsedCrowbarOnDoor(string &in asItem, string &in asEntity)
{
AddTimer("", 0.2, "TimerSwitchShovel");
RemoveItem("crowbar_1");
}


void TimerSwitchShovel(string &in asTimer)
{
PlaySoundAtEntity("","puzzle_place_jar.snt", "", 0, false);
SetEntityActive("crowbar_joint_1", true);
}


void CollideAreaBreakDoor(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(35.05f, true);
PlayMusic("00_cuts.ogg", false, 0.7, 0.1, 10, false);
SetSwingDoorLocked("door_1", false, true);
AddPropImpulse("door_1", -3, 0, 0, "world");
SetSwingDoorDisableAutoClose("door_1", true);
SetSwingDoorClosed("door_1", false, false);
SetMoveObjectState("door_1", 1);
PlaySoundAtEntity("","break_wood_metal", "AreaBreakEffect", 0, false);
CreateParticleSystemAtEntity("", "ps_hit_wood", "AreaBreakEffect", false);
SetEntityActive("crowbar_joint_1", false);
SetEntityActive("crowbar_dyn_1", true);
SetLocalVarInt("Door", 1);
}

This is my script. I copy this with my own custom story. Hope I help you.