Frictional Games Forum (read-only)
Need some help on setting up an event - 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: Need some help on setting up an event (/thread-16289.html)



Need some help on setting up an event - Damascus - 06-19-2012

Alright this one's kind of a generic request on how to set up an event I'm trying to script. All the ways that I have tried to approach it haven't worked so far...

[Image: GOhxi.jpg]

The player is approaching from the right, past the barricaded doorway. As soon as he enters the intersection, an enemy comes charging at him from the adjacent hallway. Before he can react, it hits him, and blasts him through the barricade and into the blocked-off hallway.

So far I've got most of the script laid out. I got the PlayerBodyForce to trigger at the instant the player takes damage. However, throwing the player through the barricade is proving more challenging.

If the player only barely enters the area and stops when he gets attacked, he just hits the doorframe and falls down. I tried to solve this by making the ScriptArea more narrow, but then the player can sneak past it without ever triggering the enemy. I also tried teleporting the player to a spot directly in front of the barricade before he receives the body force, but the change in the camera is very obvious.

Anyone have some helpful advice? :/


RE: Need some help on setting up an event - Your Computer - 06-19-2012

Furniture, debris, anything that takes up enough space and makes the area look more natural would prevent the player from bypassing the area.


RE: Need some help on setting up an event - palistov - 06-19-2012

Try this: Put a block box on the left side of the intersection, such that it aligns with the left side of the doorway. You can even angle it if you want. Then, when the player hits the area, add some force towards the blockbox. It will funnel them into the doorway, so to speak.


RE: Need some help on setting up an event - Damascus - 06-19-2012

Well they will need to go down that way too. And as far as I can tell, setting block boxes inactive doesn't stop them from blocking the player's movement.


RE: Need some help on setting up an event - Your Computer - 06-19-2012

(06-19-2012, 09:33 AM)Damascus Wrote: Well they will need to go down that way too. And as far as I can tell, setting block boxes inactive doesn't stop them from blocking the player's movement.

Setting block boxes inactive does let the player (and monster) move through it.


RE: Need some help on setting up an event - Damascus - 06-19-2012

That's very strange then, because one of my first solutions I tried was putting some slanted block boxes there that would be turned active when the player entered the script area. I unchecked both "active" boxes but when I went in-game, I couldn't cross the area where I had placed them.

But I tested it again right now and it seems to work. I must not have saved it properly the first time. Thanks for the help! It works great now!

The block_box does reduce a lot of the inertia of the player but I just have to fine tune the force so that the player gets thrown a good distance whether or not he hits the block_box.


RE: Need some help on setting up an event - FlawlessHappiness - 06-19-2012

Or you could make the player go blackout, and then wake up behind the blocked door, and the boards are destroyed..