![]() |
Teleporting naked guys - 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) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Teleporting naked guys (/thread-18525.html) |
Teleporting naked guys - Storfigge - 09-27-2012 Hey! So I've tried to create a teleporting naked guy but I've run into a problem. When I load my map it says "Unexpected end of file". I have no clue of what I'm doing wrong :/ Here's the code I have written so far, the bold text is the teleporting naked guy: ///////////////////////////// // Run first time starting map void OnStart() { AddUseItemCallback("", "key1", "bedroomdoor1", "UsedKeyOnDoor1", true); AddUseItemCallback("", "key2", "bedroomdoor2", "UsedKeyOnDoor2", true); AddEntityCollideCallback("Player", "TP_Script_1", "Tp_Jesus", true, 1); } void UsedKeyOnDoor1(string &in asItem, string &in asEntity) { SetSwingDoorLocked("bedroomdoor1", false, true); PlaySoundAtEntity("", "unlock_door", "bedroomdoor1", 0, false); RemoveItem("key1"); } void UsedKeyOnDoor2(string &in asItem, string &in asEntity) { SetSwingDoorLocked("bedroomdoor2", false, true); PlaySoundAtEntity("", "unlock_door", "bedroomdoor2", 0, false); RemoveItem("key2"); } void DoorLockedPlayer(string &in entity) { if(GetSwingDoorLocked("bedroomdoor1") == true) { SetMessage("Messages", "msgname", 0); } void Tp_Jesus(string &in asParent, string &in asChild, int alState) { SetEntityActive("Tp_Naked_1", true); AddPropForce("Tp_Naked_1", 0, 0, -10000, "World"); } ///////////////////////////// // Run when entering map void OnEnter() { } ///////////////////////////// // Run when leaving map void OnLeave() { } RE: Teleporting naked guys - The chaser - 09-27-2012 I don't see anything wrong ![]() Also, this is technical support. This should be in development support, there is where people try to fix things. RE: Teleporting naked guys - Vic7im - 09-27-2012 There's a " missing somewhere, check again. RE: Teleporting naked guys - Mooserider - 09-27-2012 PHP Code: void DoorLockedPlayer(string &in entity) It's nothing to do with the flying Jesus, you need another "}" on a new line after that. Should be: PHP Code: void DoorLockedPlayer(string &in entity) ...Although I'd like to quietly suggest that you don't use teleporting naked guys, and instead use build-up and atmosphere. They're kinda infamous. But hey, if you'd prefer to do that, go ahead. |