Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need some help on setting up an event
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#1
Need some help on setting up an event

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? :/

(This post was last modified: 06-19-2012, 08:49 PM by Damascus.)
06-19-2012, 08:02 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Need some help on setting up an event

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

Tutorials: From Noob to Pro
06-19-2012, 08:10 AM
Website Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#3
RE: Need some help on setting up an event

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.

(This post was last modified: 06-19-2012, 08:28 AM by palistov.)
06-19-2012, 08:28 AM
Find
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#4
RE: Need some help on setting up an event

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.

06-19-2012, 09:33 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#5
RE: Need some help on setting up an event

(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.

Tutorials: From Noob to Pro
06-19-2012, 10:46 AM
Website Find
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#6
RE: Need some help on setting up an event

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.

06-19-2012, 08:48 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#7
RE: Need some help on setting up an event

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

Trying is the first step to success.
06-19-2012, 09:22 PM
Find




Users browsing this thread: 1 Guest(s)