void OnStart() { } AddEntityCollideCallback("Player", "ScriptArea_1", "BoardDoor", true, 1); // Set Player to Sleeping Position SetPlayerActive(false); FadeOut(0.0f); SetPlayerCrouching(true); MovePlayerHeadPos(0, -0.75f, 0, 10, 0); FadePlayerRollTo(37.75f, 10, 10); // Ready Timer for Wake AddTimer("Time1", 2.5f, "Wake"); } }
On the third line, you have a closing brace which would close the OnStart(), and generate errors for the rest of that set of code there.
Edit: If you remove that closing brace, remove another at the bottom of the OnStart() area as well. If you do not fully understand, this is what your code should look like:
void OnStart() { AddEntityCollideCallback("Player", "ScriptArea_1", "BoardDoor", true, 1); // Set Player to Sleeping Position SetPlayerActive(false); FadeOut(0.0f); SetPlayerCrouching(true); MovePlayerHeadPos(0, -0.75f, 0, 10, 0); FadePlayerRollTo(37.75f, 10, 10); // Ready Timer for Wake AddTimer("Time1", 2.5f, "Wake"); }
Now, I do not think you can call timers at 0.0f. You CAN however change the two which happen instantly by changing 0.0f to 0.001f, which is practically instantaneous. Give that an attempt, otherwise I do not know exactly what is wrong. Perhaps I misread some syntax, but the game would return an error in that case.
Discord: Romulator#0001
(This post was last modified: 10-26-2014, 12:21 AM by Romulator.)