Frictional Games Forum (read-only)
How to make Script puzzles? - 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: How to make Script puzzles? (/thread-8728.html)

Pages: 1 2


How to make Script puzzles? - HumiliatioN - 06-21-2011

Yeah. What code i need to:

- make like "pull couple books to trigger" and move shelf like normal Amnesia game.

- Pull or push to many switches in order to make some door open?

- Many more complicated puzzles and mixing chemicals to make explosive or combine items?

I dont know how to do any of this :/ Help! Sad


RE: How to make Script puzzles? - WatzUpzPeepz - 06-21-2011

Check the original game hps,the archive's hps should have the book script you want.


RE: How to make Script puzzles? - HumiliatioN - 06-21-2011

(06-21-2011, 04:18 PM)WatzUpzPeepz Wrote: Check the original game hps,the archive's hps should have the book script you want.

Okay, but how i can get to other puzzles work?


RE: How to make Script puzzles? - Nye - 06-21-2011

It all depends upon what you want to do. There is no one script that will work for all puzzles Tongue Be creative and try to copy the game files, improve on your scripting etc.

If you have a specific puzzle question, I'm sure that we can help, but you will need to specify exactly what you want the puzzle be.


RE: How to make Script puzzles? - HumiliatioN - 06-21-2011

(06-21-2011, 04:21 PM)Nye Wrote: It all depends upon what you want to do. There is no one script that will work for all puzzles Tongue Be creative and try to copy the game files, improve on your scripting etc.

If you have a specific puzzle question, I'm sure that we can help, but you will need to specify exactly what you want the puzzle be.

Okay. I let you know when I know what kind of puzzle I want Smile


RE: How to make Script puzzles? - rojkish - 06-21-2011

If you want the book puzzle you should use LocalVariables, i.e;

When the player pulls the first book, the localvariable sets to 1(add a timer to remove it after 10 seconds or whatever), and when he pulls the second, the localvariable turn to two etcetc

Firstly, you should make an area where the function will happen for all the books(when the book touches this area it begins to get higher variables)

So when the first book touches ScriptArea_1, you add a localvariable, and when the second book touches ScriptArea_2, you add another localvariable, and when the variables are at a certain number (let's say three), a function happens which moves the shelf.


RE: How to make Script puzzles? - HumiliatioN - 06-22-2011

(06-21-2011, 07:16 PM)rojkish Wrote: If you want the book puzzle you should use LocalVariables, i.e;

When the player pulls the first book, the localvariable sets to 1(add a timer to remove it after 10 seconds or whatever), and when he pulls the second, the localvariable turn to two etcetc

Firstly, you should make an area where the function will happen for all the books(when the book touches this area it begins to get higher variables)

So when the first book touches ScriptArea_1, you add a localvariable, and when the second book touches ScriptArea_2, you add another localvariable, and when the variables are at a certain number (let's say three), a function happens which moves the shelf.

Can you show me example how to do it in code?

I'm confused :I




RE: How to make Script puzzles? - laser50 - 06-22-2011

From what i know from PAWN, is that you can make your own.

Just make a book collide with a Scriptarea (Like said above)
If that happened, just do something like: BooksPulled == 1);

No, I have NO idea how it works in Amnesia. but that should be a base.


RE: How to make Script puzzles? - HumiliatioN - 06-22-2011

(06-22-2011, 02:06 PM)laser50 Wrote: From what i know from PAWN, is that you can make your own.

Just make a book collide with a Scriptarea (Like said above)
If that happened, just do something like: BooksPulled == 1);

No, I have NO idea how it works in Amnesia. but that should be a base.

Ugh. I dont have any clue how to do that? Confused


RE: How to make Script puzzles? - rojkish - 06-23-2011

Just simply open 03_archives from the original game, take a look at their code and copy it and change the names so it suits you, if the script doesn't work, post here again and I'll take a look at it.