Jump to content
Sign in to follow this  
Wiki

how to prevent 2 things

Recommended Posts

Well, I want to prevent the player from accelerating time in some moments - for important dialogs for example.

Not all the time of course.

For example, when the player reaches the objective and the dialogs begins, I want the player not being able to accelerate time.

Concerning the second point, I just want to prevent 3rd pers view (or force 1st pers view) when the player is in a vehicle - just like Sarge Studio did in their "Deliverance" campaign.

And force the 1st pers view as soon as the player enters the vehicle - even if he was in 3rd pers view.

Share this post


Link to post
Share on other sites

Start your dialog/cutscene with this:

disableAcctime = true;
[] spawn {
while {disableAcctime} do {
if(accTime != 1.0) then {setAccTime 1.0;};
Sleep 0.01;
};
}; 

And when the scene is over: disableAcctime = false;

Share this post


Link to post
Share on other sites

Great, both things work!

Thank you very much!

Share this post


Link to post
Share on other sites

you dont need a while loop running the whole time. Use a waitunitl together with sleep. It saves performance. You can reduce the sleep time.

The player can see just one sec the 3rd person. After a while, the players stop to try to switch in 3rd person :smile:

if (local player) then 
{
while {true} do { 
waituntil {sleep 1; (vehicle player != player) && (cameraView == "EXTERNAL")};
vehicle player switchCamera "INTERNAL";
};
};

But it's funny. Most servers do it this way, the the player can use 3rd person, when they are inside a vehicle and outside they have only 1st person.

Edited by Drunken Officer

Share this post


Link to post
Share on other sites

Well, everything works fine now, just as I wanted.

Thank you all.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×