[SCRIPT] Can't progress without picking up note+key Script? - 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] Can't progress without picking up note+key Script? (/thread-24534.html) Pages:
1
2
|
Can't progress without picking up note+key Script? - FurtherGames - 02-03-2014 I'll try to keep my posts to a minimal. Can't believe I've been working on this map for around 2-3 months. Maybe a bit more. Still haven't finished the first map. I'm close to finishing, I just want to add a few small tweaks which will make the custom story more complete and special. Basically, the character starts in the hotel reception. Before he can walk over to the Room Corridor, he must first pick up the note and key. The note tells him where is Room Key is and the key is in the top drawer. I want a script so that if the character tries to go towards the Room Corridor before he picks up the note, it turns the screen to look at the note and a message is displayed saying "I best pick up that note first." Then once he reads the note and tries to go to the Room Corridor before picking up the key, screen turns to basically look at the same part (Because of the angle) and a message "I'm going to need my key." I know how to display the message & make the character look at a script area, plus how to use a timer. I just don't know how to trigger a script and make it so two different things show up, depending if he has picked up the key or note or whatever. RE: Can't progress without picking up note+key Script? - Slanderous - 02-03-2014 Send me your map here, and I will see what I can do. RE: Can't progress without picking up note+key Script? - DnALANGE - 02-03-2014 Make 2 script area's. You can do it on the exacpt same spot. Then do this for the FIRST look : Quote:void OnStart()+ DEactivate the second scriptarea in the leveleditor. Quote: void JUSTHECALLBACKNAME(string &in asItem) ------ Do you understand what i mean here? If not, i'll explane more. Try it, it should work! RE: Can't progress without picking up note+key Script? - FurtherGames - 02-04-2014 (02-03-2014, 11:22 PM)DnALANGE Wrote: Make 2 script area's. What do you mean by "just your script name"? And if that's the function it calls on, where is it? RE: Can't progress without picking up note+key Script? - DnALANGE - 02-05-2014 "JUSTYOURSCRIPTNAME", Meaning i just name the scriptfuncion that.. You can change it in somethng you want.. Those functions are onstart. --- AddEntityCollideCallback - there are 2 of these for 2 scriptarea's in your leveleditor. Name them : 1 = FIRSTSCRIPTAREA 2 = SECONDSCRIPTAREA Hope this helps you a little. -------- -- And if that's the function it calls on, where is it?-- AWNSER : You have to make them yourself. Here is the function, you need to do the rest yourself. Quote: void JUSTYOURSCRIPTNAME(string &in asParent, string &in asChild, int alState) RE: Can't progress without picking up note+key Script? - PutraenusAlivius - 02-05-2014 It'll be much easier to just use one area and with some if-else statements. PHP Code: void OnStart() RE: Can't progress without picking up note+key Script? - DnALANGE - 02-05-2014 Hd want 2 scriptareas.. 1 is i need the note message 1 is i need the key message so 2 scriprareas needed here. maybe add it there player. RE: Can't progress without picking up note+key Script? - PutraenusAlivius - 02-05-2014 (02-05-2014, 03:32 AM)DnALANGE Wrote: Hd want 2 scriptareas.. You don't have to make 2 areas. You can just do it with just 1 Script Area by using If-Else statements like I did. If the Player picks up the note, but not the key a message will appear. If both is picked up, then another message appears. See? It's easier to use If-Else statements with just 1 Script Area rather then 2 Script Area with Activate-Deactivating it. RE: Can't progress without picking up note+key Script? - FurtherGames - 02-05-2014 (02-05-2014, 03:39 AM)JustAnotherPlayer Wrote:(02-05-2014, 03:32 AM)DnALANGE Wrote: Hd want 2 scriptareas.. I don't want a message to appear when they pick up both that's the point. I've figured it out using my own method which involves two script areas. I'd rather just use two so I can see what I'm doing. RE: Can't progress without picking up note+key Script? - DnALANGE - 02-05-2014 Next time be more explicit to what you want. THIS here is 2 messages...?? Quote: I want a script so that if the character tries to go towards the Room Corridor before he picks up the note, it turns the screen to look at the note and a message is displayed saying "I best pick up that note first."--- I've figured it out using my own method ??? That's what i try to say the whole time... Anyway... try harder next time maybe? IF you think you can do it.? |