![]() |
script help - 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: script help (/thread-14752.html) |
script help - zombiehacker595 - 04-13-2012 void Onstart() { AddUseItemCallback("", "stone_hammer_chipper", "wooden_boards_block_1", "DestoryBlockage", true); SetEntityPlayerInteractCallback("key_laboratory_1", "Scare", true); AddEntityCollideCallback("Player", "Message_1", "Message1", true, 1); AddEntityCollideCallback("Player", "ScriptArea_2", "OpenDoor", true, 1); AddUseItemCallback("OpenDoor", "key_laboratory_2", "level_wood_3", "UnlockLevelDoor", true); } void DestoryBlockage(string &in asItem, string &in asEntity) { AddPlayerSanity(25); SetPropHealth("wooden_boards_block_1", 0.0f); SetEntityActive("wooden_boards_block_broken_1",true); RemoveItem("stone_hammer_chipper"); SetEntityActive("wooden_boards_block_1", false); PlaySoundAtEntity("","break_wood_metal.snt", "ScriptArea_1", 0, false); } void UnlockLevelDoor(string &in item, string &in entity) { SetLevelDoorLocked(entity, false); RemoveItem("key_laboratory_2"); PlaySoundAtEntity("", "unlock_door", "player", 0, false); } void Message1(string &in asChild, string &in asParent, int alState) { SetMessage("Messages", "PopupM", 0); } void Scare(string &in Entity) { SetEntityActive("armour_nice_complete_4", true); SetEntityActive("armour_nice_complete_5", true); SetEntityActive("armour_nice_complete_6", true); } void OnEnter() { } void Onleave() { } this whole room doesnt work i cant figure it out? RE: script help - ClayPigeon - 04-13-2012 You can remove the item when the player enters the map and then give it to him again using: void GiveItem(string& asName, string& asType, string& asSubTypeName, string& asImageName, float afAmount); void RemoveItem(string& asName); RE: script help - zombiehacker595 - 04-13-2012 (04-13-2012, 10:20 AM)ClayPigeon Wrote: You can remove the item when the player enters the map and then give it to him again using: yea i figured out the scripting was fine the whole room is actually screwed? none of the scripts in the room work for some weird reason? RE: script help - ClayPigeon - 04-13-2012 Make sure the .hps file has the exact same name of the .map file of the room. RE: script help - Your Computer - 04-13-2012 OnStart != Onstart. RE: script help - zombiehacker595 - 04-13-2012 (04-13-2012, 10:28 AM)ClayPigeon Wrote: Make sure the .hps file has the exact same name of the .map file of the room. nah i figured it out i feel pretty stupid it was suposed to be void OnStart not void Onstart geez i am so releived |