[SCRIPT] Locking Doors ,Give Item ,and Lights - 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] Locking Doors ,Give Item ,and Lights (/thread-20024.html) |
Locking Doors ,Give Item ,and Lights - No Author - 01-22-2013 I'm trying to make a script where the player can lock and unlock the same door. But when I lock it, it doesn't lock the door. Here's my script : PHP Code: void OnStart() And I want to make a script where the player can interact with a candle to turn it off if it's lit. I've searched on the engine scripts and I didn't found anything about turning off candles. RE: Locking Doors ,Give Item ,and Lights - FlawlessHappiness - 01-22-2013 For the lock&unlock Code: void OnStart() Could you show me your "GiveItem" line? RE: Locking Doors ,Give Item ,and Lights - No Author - 01-22-2013 Here : PHP Code: void OnStart() RE: Locking Doors ,Give Item ,and Lights - FlawlessHappiness - 01-22-2013 key_study_height.tga does not sound like a .tga file. Isn't it just key_study.tga? RE: Locking Doors ,Give Item ,and Lights - No Author - 01-22-2013 (01-22-2013, 11:56 AM)BeeKayK Wrote: key_study_height.tga does not sound like a .tga file. Lol. It works now RE: Locking Doors ,Give Item ,and Lights - FlawlessHappiness - 01-22-2013 void SetLampLit(string& asName, bool abLit, bool abEffects); (Un)lits a lamp. asName - Name of the lamp abLit - Set true if you want the lamp to be lit, set to false if you want the lamp to be unlit abEffects - If you want to have the lamp fade in/out when it gets (un)lit RE: Locking Doors ,Give Item ,and Lights - No Author - 01-22-2013 (01-22-2013, 12:39 PM)BeeKayK Wrote: void SetLampLit(string& asName, bool abLit, bool abEffects); Yeah it all works now. Thanks ! By the way, is it possible to unlock the door if I lock it ? RE: Locking Doors ,Give Item ,and Lights - FlawlessHappiness - 01-22-2013 Just use the key again? RE: Locking Doors ,Give Item ,and Lights - No Author - 01-22-2013 (01-22-2013, 12:48 PM)BeeKayK Wrote: Just use the key again? It doesn't work. Oh yeah, I made the door locked in the level editor RE: Locking Doors ,Give Item ,and Lights - FlawlessHappiness - 01-22-2013 Weird it should work. Does anything happen to the door? Does the sound play? Does it say "Cannot use item this way"? |