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
Script Help Scripting a fall sequence.
Pshyched Offline
Member

Posts: 130
Threads: 21
Joined: Nov 2012
Reputation: 5
#1
Scripting a fall sequence.

Hey there, I have another question. How would I go about creating a fall sequence which simulated the player falling over a barrier and down to a lower level?

[Image: zump.jpg]

The Image above shows what I want done. When the player enters the Area, I want a cinematic-like event to happen where the player turns around and gets pushed over the edge by an unseen force. But Simulating the roll and falling velocity would seem quite a challenge.

I had a look around the Amnesia files and saw the Wake Up sequence, but I'm still not sure if i understand the parameters correctly. Does anyone know an easy way of creating something like this?
(This post was last modified: 07-01-2013, 04:29 PM by Pshyched.)
07-01-2013, 04:24 PM
Find
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#2
RE: Scripting a fall sequence.

Depends what you consider to be easy Tongue

You wouldn't have to worry about the falling speed, as the engine already has gravity - all you have to do is push the player off and let it take care of the rest.

As for screen/camera effects, it depends on how much you really want. Using StartPlayerLookAt etc you can get them looking the right way, and also to get their camera to move around appropriately but it looks like quite a short drop, so there isn't going to be enough time to do anything super complicated.

Just take it step by step. First work out how to push them over the edge (AddPlayerBodyForce, probably want to make the railing non-collidable), then take time to use StartPlayerLookAt with a timer to get them looking the right way, then add some rolling if it seems appropriate. Break the problem down into steps and take them one at a time.

Honestly, using a Wake Up script as a template for this is probably a bad idea - you'd have to do so much work to it to get it right that you may as well write it from scratch anyway. You would still need to understand the process to be able to adapt the wake up script, so there is little to no benefit

Hope that helps!

07-01-2013, 06:34 PM
Find
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#3
RE: Scripting a fall sequence.

You may also want to utilize the FadePlayerRollTo and MovePlayerHeadPos scripts. You can actually make some pretty cinematic moment's in amnesia if you put in the scripting time.

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
07-01-2013, 09:04 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Scripting a fall sequence.

At most you'd probably only need the following HPL2 functions: AddPlayerBodyForce, AddEntityCollideCallback, AddTimer, StartPlayerLookAt, StopPlayerLookAt, and SetPlayerSanity (setting the player's sanity to 0 will automatically provide a collapse animation with screen effects).

Tutorials: From Noob to Pro
07-02-2013, 01:48 AM
Website Find




Users browsing this thread: 1 Guest(s)