Jump to content

Start the game in third person view


Kronky

Recommended Posts

Halv, first and foremost i just want to thank you for those great scripts you have,

 

Second, would you be kind and tell where should i use that code?

Is it in the init file ?

 

put it in a script and do something like this:

if(hasInterface)then{
execVM "path\to\script.sqf";
};
Link to comment
Share on other sites

Ok so here is what i did ...

 

-i created a file 3rd_pers.sqf and put it in addons\3rd_pers folder

-then in init.sqf i did this:

if(hasInterface) then{ 
    [] execVM "addons\3rd_pers\3rd_pers.sqf";
};

I log in and i select gender but I still get in first person.

I use your script for spawing in a location and then i am tped there again on first person.

 

I could not get to work that code and I wonder if it isn't something that is in the side of epoch we can't modify.

Link to comment
Share on other sites

Ok so here is what i did ...

 

-i created a file 3rd_pers.sqf and put it in addons\3rd_pers folder

-then in init.sqf i did this:

if(hasInterface) then{ 
    [] execVM "addons\3rd_pers\3rd_pers.sqf";
};

I log in and i select gender but I still get in first person.

I use your script for spawing in a location and then i am tped there again on first person.

 

I could not get to work that code and I wonder if it isn't something that is in the side of epoch we can't modify.

 

do you have another if(hasInterface line?

 

if so, put this line within that scope instead of making its own if(hasInterface line.

Link to comment
Share on other sites

here is what i have:

 

init.sqf:

[] execVM "addons\halv_spawn\init.sqf"; //Florin - Halv Spawn, etc.
[] execVM "addons\paintshop\paintshop.sqf"; //Florin - Halv Painthsop
[] execVM "addons\cmEarplugs\config.sqf"; //Florin - earplugs
[] execVM "start_blck.sqf"; //Florin - Blacks Missions

if (hasInterface) then {
    execVM "addons\3rd_pers\3rd_pers.sqf"; //Florin - Spawn in 3rd person
    
    #include "addons\A3EAI_Client\A3EAI_initclient.sqf";
    
	"VEMFChatMsg" addPublicVariableEventHandler
	{
		systemChat ((_this select 1) select 0);
		[
			[
				[((_this select 1) select 0),"align = 'center' size = '1' font='PuristaBold'"],
				["","<br/>"],
				[((_this select 1) select 1),"align = 'center' size = '0.5'"]
			]
		] spawn BIS_fnc_typeText2;
		VEMFChatMsg = nil;
	};
};

[] execVM "addons\kmessages\init.sqf"; //Florin - Halv Kmessage

and now the 3rd_pers.sqf:

waitUntil{!isNil "Epoch_my_GroupUID" && cameraView == "INTERNAL" && cameraOn isEqualTo player};
player switchCamera "EXTERNAL";

I am trying this other method and see if i can make it work.

Link to comment
Share on other sites

Unfortunately it didn't work.

:(

 

i havent actually tested it by adding it as a script on my server ... ill check it later to see if it works for me, but this should work like this.

i cant see why it wouldnt, since it would wait till the point where player is assigned to the epoch group and at this point the player should already spawned.

 

do you use the script that zooms in the camera on the character as you spawn in?

Link to comment
Share on other sites

 

do you use the script that zooms in the camera on the character as you spawn in?

 

No I don't. I mean those are the only scripts that i have set up on the server and are in the init file.

 

I am running the server having InfiSTAR installed so i don't know if there is a restriction from that.

 

Otherwise if I open a command shell during the game and paste that "player switchCamera "EXTERNAL";" should that automatically switch my character ?

Link to comment
Share on other sites

i tested it and i can see it dosnt work, but im not sure why, try add a sleep and see if it helps ... ill see if i can find a better way to make it seem more natural

 

edit, perhaps this works 9/10 times when you log in:

waitUntil{!isNull (findDisplay 46)};
waitUntil{!dialog};
waitUntil{cameraOn isEqualTo player};
waitUntil{cameraView == "INTERNAL"};
waitUntil{!isNil "Epoch_my_GroupUID"};
player switchCamera "EXTERNAL";
Link to comment
Share on other sites

 

i tested it and i can see it dosnt work, but im not sure why, try add a sleep and see if it helps ... ill see if i can find a better way to make it seem more natural

 

edit, perhaps this works 9/10 times when you log in:

waitUntil{!isNull (findDisplay 46)};
waitUntil{!dialog};
waitUntil{cameraOn isEqualTo player};
waitUntil{cameraView == "INTERNAL"};
waitUntil{!isNil "Epoch_my_GroupUID"};
player switchCamera "EXTERNAL";

 

You know, after suggesting the sleep i used your original sugestion of one line of code and added a sleep 3 after the waitUntil and before the player switch and it works fabulous.

 

so I was able to eliminate all the other waitUntils. Thank you Halv.

Link to comment
Share on other sites

You know, after suggesting the sleep i used your original sugestion of one line of code and added a sleep 3 after the waitUntil and before the player switch and it works fabulous.

 

so I was able to eliminate all the other waitUntils. Thank you Halv.

 

imho it would be best done using a waituntil so it happends exactly when it can and before the player is actually "spawned" so he or she does not experience the switch ...

Link to comment
Share on other sites

imho it would be best done using a waituntil so it happends exactly when it can and before the player is actually "spawned" so he or she does not experience the switch ...

 

Agree...

 

Halv, I added a sleep before the switch and it works flawlessly.  Called it from the (hasInterface) like you mentioned.  Respawn into the clone chamber, there's about a second delay, then you go 3rd person.  When you load into game not as a respawn, you are in first person for roughly a second, then blam, you go 3rd person.  I'll tinker with the sleep and see what I come up.  Thank you for the help and many thanks to Kronky for post.

Link to comment
Share on other sites

imho it would be best done using a waituntil so it happends exactly when it can and before the player is actually "spawned" so he or she does not experience the switch ...

 

I completely agree, but how do we know exactly when is the character spawned?

 

Agree...

 

Halv, I added a sleep before the switch and it works flawlessly.  Called it from the (hasInterface) like you mentioned.  Respawn into the clone chamber, there's about a second delay, then you go 3rd person.  When you load into game not as a respawn, you are in first person for roughly a second, then blam, you go 3rd person.  I'll tinker with the sleep and see what I come up.  Thank you for the help and many thanks to Kronky for post.

 

I like your avatar, I can't believe that image is stuck in my brain ... that must be ... Toecutter from Mad Max, right ?

Link to comment
Share on other sites

Believe it or not ...

 

I did this:

waitUntil{!isNil "Epoch_my_GroupUID"};
sleep 0.15;
player switchCamera "EXTERNAL";

I used float because "sleep" takes a "Number" and with BI it can be anything from float, double or integer.

 

And now it's instant on 3rd person view. Yay!.

Link to comment
Share on other sites

Believe it or not ...

 

I did this:

waitUntil{!isNil "Epoch_my_GroupUID"};
sleep 0.15;
player switchCamera "EXTERNAL";

I used float because "sleep" takes a "Number" and with BI it can be anything from float, double or integer.

 

And now it's instant on 3rd person view. Yay!.

 

I'll give that a try Kronky, thanks again.

Link to comment
Share on other sites

The one with the sleep command works very good when i am the first logging in, however i never have a second person to try to log in so i don't know if it works.

 

I will try that code as well just to see the result. Thanks you Halv for all the help.

Link to comment
Share on other sites

Believe it or not ...

 

I did this:

waitUntil{!isNil "Epoch_my_GroupUID"};
sleep 0.15;
player switchCamera "EXTERNAL";

I used float because "sleep" takes a "Number" and with BI it can be anything from float, double or integer.

 

And now it's instant on 3rd person view. Yay!.

 

I don't see the float in there? That looks like the original method?

Link to comment
Share on other sites

I don't see the float in there? That looks like the original method?

 

I thought the decimal 0.15 is considered a floating point or double type ... anyways i meant that the sleep takes a Number as an accepted value.

 

I also gave credit to Halv for his suggestions and that was basically my working solution for my situation. I hope i didn't say something that would upset somebody.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...