Frictional Games Forum (read-only)
script problem - 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: script problem (/thread-4731.html)



script problem - Nippew - 09-24-2010

Hi,
so i'm trying to make a hatch (just like there at beginning of the game) which could be opened by pulling a lever up/down. First the lever would had to be attached to the mounting plate and then the hatch opened.
So first before making that opening script (which i think i can do) i'd had to do the attaching one.
i use the line:
AddAttachedPropToProp(string& asPropName, string& asAttachName, string& asAttachFile, float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ);

Here's how my script is now:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddAttachedPropToProp("lever_1", "lever_mount", "lever_small01", "12.309", "1.767", "17.75", "0", "-90", "0");
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}


Errors and errors, is this even the right function?


RE: script problem - Pandemoneus - 09-24-2010

Don't put floats and integers in "".