help with intro - 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: help with intro (/thread-13019.html) |
help with intro - Death Icarus - 02-01-2012 so ive got this intro made. just need to add one more thing to it, but not sure how. i want the intro to start with my guy waking up, and getting out of bed. i get everything else i need scripted up. just dont know how to make it look like the player is laying in bed, then gets out of it. Rather than just spawning next to the bed like i have it now And also, how to complete a quest when i pick up an item, for example. the player gets a memo at start, i need to find a lantern. and quest gets completed(memo goes away) when i pick up the lantern. atm i have it set up to completed the quest when i enter the area in front of the lantern RE: help with intro - SilentStriker - 02-01-2012 First question: Mess around with these codes: StartPlayerLookAt(string& asEntityName, float afSpeedMul, float afMaxSpeed, string& asAtTargetCallback); StopPlayerLookAt(); MovePlayerHeadPos(float afX, float afY, float afZ, float afSpeed, float afSlowDownDist); You can use this if you want: FadePlayerRollTo(float afX, float afSpeedMul, float afMaxSpeed); You can find them all at http://wiki.frictionalgames.com/hpl2/amnesia/script_functions#player Question 2: If you already have a quest started then use CompleteQuest(string& asName, string& asNameAndTextEntry); RE: help with intro - Death Icarus - 02-01-2012 ok thanks. i should be able to get my intro now. but im confused about how to make the quest to complete when i pick up the item. im new to all this, still learning. So far i only got my quest to complete by entering a script area. do i have to use SetEntityPlayerInteractCallback("Lantern", "CompleteLantern", true) then call the function and use CompleteQuest? RE: help with intro - SilentStriker - 02-01-2012 (02-01-2012, 04:40 PM)Death Icarus Wrote: ok thanks. i should be able to get my intro now.Yes RE: help with intro - Death Icarus - 02-01-2012 cool =D. and one more question i just ran into, if i may... i have a door thats locked, and if you interact with it. you get a quest saying you need a key. And that quest is tied to a Variable, so when i complete 3 quest in this area, a door unlocks. but theres a chance that the player can find the key before he finds that locked door to get the quest. and i also want to have a quest on the key, so when you pick it up you get a quest saying find the door or whatever. so to my question, how can i set it so the game checks if i have the other quest before it gives me one of them, so i can only get one of the quest. RE: help with intro - SilentStriker - 02-01-2012 You need to use LocalVar and stuff, it is though a bit more complicated RE: help with intro - Death Icarus - 02-01-2012 ok..so maybe something like this? not really sure void OnStart() { SetLocalVarInt("Var1", 0); SetEntityPlayerInteractCallback("LockedDoor", "GetQuestDoorLocked"); SetEntityPlayerInteractCallback("Key1", "GetQuestFoundKey"); } void GetQuestDoorLocked(string& asName, string& asCallback, bool abRemoveOnInteraction) { if ("Var1" == 0) { AddQuest("DoorLocked", "DoorLocked"); SetLocalVarInt("Var1",1); } if ("Var1" ==1) { //not really sure what to add here? } } and the same for the key? RE: help with intro - SilentStriker - 02-01-2012 Not really I'm going to give you an example that I use in my CS. This code makes so that when you are touching the door, if it's locked it appears a text but when it's unlocked it doesn't appear a text. void OnStart() { SetLocalVarInt("DoorLocked", 1); SetEntityPlayerInteractCallback("level_wood_1", "TextLockedDoor", false); } void TextLockedDoor(string &in asEntity) { if(GetLocalVarInt("DoorLocked") == 1){ SetMessage("Message", "LevelDoorUnlock", 3); AddQuest("03Books", "03Books"); } } RE: help with intro - Death Icarus - 02-01-2012 thank you (02-01-2012, 06:58 PM)SilentStriker Wrote: Not really I'm going to give you an example that I use in my CS. |