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
FadePlayerFOVMulTo Problems
thetastyfish Offline
Junior Member

Posts: 18
Threads: 6
Joined: Feb 2013
Reputation: 0
#1
FadePlayerFOVMulTo Problems

Hi! So, I'm starting to learn the art of using screen effects, and I have an issue. I'm using FadePlayerFOVMulTo, but can't figure out how to undo it after a certain amount of time.

void Valkyrie(string &in asParent, string &in asChild, int alState)
{
AddTimer("Open", 2, "Action");
PlayMusic("Ride.ogg", false, 100, 0, .5, true);
SetPlayerActive(false);
FadePlayerFOVMulTo(.5, 2);
StartPlayerLookAt("cabinet_simple_1", 10, 10, "");
}

void Action(string &in asTimer)
{
SetMoveObjectStateExt("cabinet_simple_1", 1, 50, 1000, 0, true);
AddPlayerBodyForce(-30000, 0, -100000, false);
AddPropForce("armchair_1", -500, 1000, 0, "world");
AddPropForce("goblet_1", -500, 1000, 0, "world");
AddPropImpulse("armchair_1", -100, 100, 0, "world");
SetPlayerActive(true);
FadePlayerFOVMulTo(0, 0);
StopPlayerLookAt();
ChangePlayerStateToNormal();
}

Under void Action, I tried to set it back to 0, but it didn't do anything, the screen was still zoomed in. If anyone could help me, I would really appreciate it. Thank you!
03-21-2013, 11:02 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: FadePlayerFOVMulTo Problems

From the Script Functions page;
Quote: [...]Changes the field of view of the player. A shorter FOV will create a zoom effect.[...]
Which means a shorter FOV will create a zoom effect. Try to make it higher.

"Veni, vidi, vici."
"I came, I saw, I conquered."
03-21-2013, 11:11 AM
Find
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#3
RE: FadePlayerFOVMulTo Problems

(03-21-2013, 11:02 AM)thetastyfish Wrote:
Spoiler below!

Hi! So, I'm starting to learn the art of using screen effects, and I have an issue. I'm using FadePlayerFOVMulTo, but can't figure out how to undo it after a certain amount of time.

void Valkyrie(string &in asParent, string &in asChild, int alState)
{
AddTimer("Open", 2, "Action");
PlayMusic("Ride.ogg", false, 100, 0, .5, true);
SetPlayerActive(false);
FadePlayerFOVMulTo(.5, 2);
StartPlayerLookAt("cabinet_simple_1", 10, 10, "");
}

void Action(string &in asTimer)
{
SetMoveObjectStateExt("cabinet_simple_1", 1, 50, 1000, 0, true);
AddPlayerBodyForce(-30000, 0, -100000, false);
AddPropForce("armchair_1", -500, 1000, 0, "world");
AddPropForce("goblet_1", -500, 1000, 0, "world");
AddPropImpulse("armchair_1", -100, 100, 0, "world");
SetPlayerActive(true);
FadePlayerFOVMulTo(0, 0);
StopPlayerLookAt();
ChangePlayerStateToNormal();
}


Under void Action, I tried to set it back to 0, but it didn't do anything, the screen was still zoomed in. If anyone could help me, I would really appreciate it. Thank you!

It's because the default value is 1 I believe...
My 'reset' call looks like this

FadePlayerFOVMulTo(1, 1);

Hope that helps. In the future, questions like this should go into the 'Development Support' sub-forum Smile

03-21-2013, 12:49 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#4
RE: FadePlayerFOVMulTo Problems

To ZOOM in you may use that function.
FadePlayerFOVMulTo(0.40, 1.4f); <--- in 1 of my scriptlines
The 0.40 means how FAR you wil zoom and the 1.4f is the speed it takes to zoom in.. { the lower the first value the further you will zoom in }
SO.. after you done this you want to look normal again offcourse..
Then use this { copy past if you like }
FadePlayerFOVMulTo(1, 1);
The 1 is go to normal for maybe ALL of the commands in the scriptings.
Hope this small issue helps you out.
If not go here->
http://www.frictionalgames.com/forum/thread-10798.html
(This post was last modified: 03-21-2013, 03:09 PM by DnALANGE.)
03-21-2013, 03:09 PM
Find
thetastyfish Offline
Junior Member

Posts: 18
Threads: 6
Joined: Feb 2013
Reputation: 0
#5
RE: FadePlayerFOVMulTo Problems

Thank you guys so much, it's funny how something that simple (that I thought I tried, but obviously didn't) fixed my issue.

Adrianis: I'm still learning the forums, so I'll try to classify it better next time Smile
03-21-2013, 07:46 PM
Find




Users browsing this thread: 1 Guest(s)