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 :)
Catalyst Offline
Member

Posts: 213
Threads: 32
Joined: Aug 2014
Reputation: 3
#1
Need some help :)

Greetings to all forum members,
I have a newbie question,how to make on startup player to lie down? like in the original Amnesia in the Rain Hall. It's very important for me and more for my custom story.

Thanks for wiewing anyway Smile

Egypt CS
[Image: 27003.png]
08-29-2014, 10:12 AM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#2
RE: Need some help :)

(08-29-2014, 10:12 AM)Catalyst Wrote: Greetings to all forum members,
I have a newbie question,how to make on startup player to lie down? like in the original Amnesia in the Rain Hall. It's very important for me and more for my custom story.

Thanks for wiewing anyway Smile

You can use
SetPlayerCrouching(bool abCrouch);

To make the player look like he's lying down as you said.

Do you want like a wakeup kinda scenerio?

08-29-2014, 10:22 AM
Find
Catalyst Offline
Member

Posts: 213
Threads: 32
Joined: Aug 2014
Reputation: 3
#3
RE: Need some help :)

"Do you want like a wakeup kinda scenerio?"- Yes ,like this,now i should test it)

Not working

Egypt CS
[Image: 27003.png]
(This post was last modified: 08-29-2014, 10:38 AM by Catalyst.)
08-29-2014, 10:29 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: Need some help :)

As a beginner it might take a lot of practise and adjusting to get right, but it isn't too difficult.

You need to make a sequence of events that trigger different movement with the player. First of all, you need to use a bunch of timers. Use AddTimer to add an effect, then place the effect script in the callback for when that timer is called. You can either add all the timers in the same place with slight time differences, or add another timer within the previous timer's callback.

You need to adjust the time to match what you want. Play around with it.

As for the effects themselves, use scripts like these:

PHP Code: (Select All)
FadePlayerRollTo(float afXfloat afSpeedMulfloat afMaxSpeed); 
- Will make the camera rotate.
PHP Code: (Select All)
MovePlayerHeadPos(float afXfloat afYfloat afZfloat afSpeedfloat afSlowDownDist); 
- Will move the camera up or down, or any other direction relative to the player.
PHP Code: (Select All)
StartPlayerLookAt(stringasEntityNamefloat afSpeedMulfloat afMaxSpeedstringasAtTargetCallback); 
- Will make the player look at a certain point (use areas with these, don't forget StopPlayerLookAt when you're done).

There are many others you can use. Test different values in them. You can find more of these scripts under the Player section on the script page: https://wiki.frictionalgames.com/doku.ph...ons#player

(This post was last modified: 08-29-2014, 10:40 AM by Mudbill.)
08-29-2014, 10:39 AM
Find
Catalyst Offline
Member

Posts: 213
Threads: 32
Joined: Aug 2014
Reputation: 3
#5
RE: Need some help :)

can you give a example? I first time see these scripts...

Egypt CS
[Image: 27003.png]
08-29-2014, 10:45 AM
Find
Artsy Offline
Member

Posts: 213
Threads: 10
Joined: Feb 2014
Reputation: 9
#6
RE: Need some help :)

Example for making player lie on the floor:
FadePlayerRollTo(50, 220, 220);

Usage of LookAt:
StartPlayerLookAt("PlayerLookAtArea_1", 0.5f, 0.5f, "FunctionName");

PlayerLookAtArea_1 - can be named anything, just make sure it matches the name of the area box or entity you want the player to look at.

0.5f and 0.5f - speed of looking at the area box/entity; maximum speed.

FunctionName - you also name this one whatever you want. It's basically the function to call when the player looks at the area box/entity.
I believe it's like this:
FunctionName()
{
     // stuff you want to happen
}

And don't forget to use StopPlayerLookAt(); when the player's done looking or else it will make you force look at the area box/entity.
08-29-2014, 11:33 AM
Find
Catalyst Offline
Member

Posts: 213
Threads: 32
Joined: Aug 2014
Reputation: 3
#7
RE: Need some help :)

thanks,its working) +1 for reputation

Egypt CS
[Image: 27003.png]
08-29-2014, 11:54 AM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#8
RE: Need some help :)

When getting something solved, don't forget to name your thread [SOLVED]"Your thread name" so people don't have to come here since it's already has been solved. okay? Wink

08-29-2014, 02:30 PM
Find




Users browsing this thread: 1 Guest(s)