Frictional Games Forum (read-only)
Puzzle 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: Puzzle Help (/thread-8820.html)



Puzzle Help - Dizturbed - 06-26-2011

Can someone pleeeeeeeease help me with puzzles Huh I dont care how they are. Im kinda new to scripting, like 5 days...

I just dont know how to script the puzzles up. Pleaz help meh! Smile


RE: Puzzle Help - xtron - 06-26-2011

If you could give uss a description on what kind of puzzle you we could help you.


RE: Puzzle Help - Dizturbed - 06-26-2011

[attachment=1609]Well, i want a hammer to smash a agrippa head, and the head will break, and a key will come out Wink

Scratch that! just a simple puzzle, thats hard to solve


RE: Puzzle Help - Rownbear - 06-26-2011

put agrippa head, place the hammer, make a script area on the head, when you use hammer on the script area, bloodparticles come and the head turns into a mash with a key in it. That's how you would do it, but do you need help with the scripting of that?

Other puzzles would be like, find the hidden lever, maybe it's stuck and you need to find oil to grease it, make acid to decay a study lock, use a hammer and chipper to go through a wall, make explosives to blow down a wall. You can do alot, you just need to figure out what you want to happen.


RE: Puzzle Help - Dizturbed - 06-27-2011

yea, thanks. But can you give me some scripts me to execute this puzzle?Smile pleaz


RE: Puzzle Help - Rownbear - 06-27-2011

ok this is a fairly simple script, first you need to place the bloodmash and the key on say, a table(where his head will be later). Then you have to make them unactive, so they cant be seen. and place them the way you want them to appear after you smash the head.

2. then you place his head, this entity is active, and will be what the player will see before it's smashed. make a script"box" so it covers the head. call it "SmashArea" or something.

and the rest is scripting

void OnStart()
{
AddUseItemCallback("", "HAMMER", "SmashArea", "HeadSmashed", true);
}


void HeadSmashed(string &in asItem, string &in asEntity)
{
RemoveItem("Hammer"); //if you want it removed
SetEntityActive("AGRIPPAHEAD", false); //hides the head
SetEntityActive("BLOODMASH", true); //Shows the bloodmash
SetEntityActive("KEY", true); //shows the key
CreateParticleSystemAtEntity("", "blood.ps", "SmashArea", false); //Some blood flying
PlaySoundAtEntity("", "attack_claw_hit.snt", "Player", 0, false); //You might want to find a fitting sound
PlayMusic("IfYouWantMusic", false, 1, 2, 0, false); //maybe some creepy music to make the puzzle better
GiveSanityDamage(10, true); //gives a better reaction to smashing a head.
}

So now when you use the hammer on the area that covers the head, it will dissapear, some blood flying, and a bloodmash and a key would be standing left.



RE: Puzzle Help - Dizturbed - 06-27-2011

Thank you very much! you guys at this forum rules! I will try your demo, thanks again! Big Grin