Kronky Posted July 23, 2015 Report Share Posted July 23, 2015 Is there a way to set up showing the third person when starting the game either new spawn or relog ? (HPG) Heavy 1 Link to comment Share on other sites More sharing options...
Halvhjearne Posted July 23, 2015 Report Share Posted July 23, 2015 waitUntil{!isNil "Epoch_my_GroupUID"}; player switchCamera "EXTERNAL"; Kronky 1 Link to comment Share on other sites More sharing options...
Kronky Posted July 23, 2015 Author Report Share Posted July 23, 2015 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 ? Link to comment Share on other sites More sharing options...
Halvhjearne Posted July 23, 2015 Report Share Posted July 23, 2015 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 More sharing options...
Kronky Posted July 24, 2015 Author Report Share Posted July 24, 2015 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 More sharing options...
Halvhjearne Posted July 24, 2015 Report Share Posted July 24, 2015 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 More sharing options...
Halvhjearne Posted July 24, 2015 Report Share Posted July 24, 2015 else try this maybe: waitUntil{!isNil "Epoch_my_GroupUID" && cameraView == "INTERNAL" && cameraOn isEqualTo player}; player switchCamera "EXTERNAL"; Link to comment Share on other sites More sharing options...
Kronky Posted July 24, 2015 Author Report Share Posted July 24, 2015 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 More sharing options...
Kronky Posted July 24, 2015 Author Report Share Posted July 24, 2015 Unfortunately it didn't work. :( Link to comment Share on other sites More sharing options...
Halvhjearne Posted July 24, 2015 Report Share Posted July 24, 2015 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 More sharing options...
Kronky Posted July 24, 2015 Author Report Share Posted July 24, 2015 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 More sharing options...
Halvhjearne Posted July 24, 2015 Report Share Posted July 24, 2015 Otherwise if I open a command shell during the game and paste that "player switchCamera "EXTERNAL";" should that automatically switch my character ? yes. this line will change to 3rd person view. Link to comment Share on other sites More sharing options...
Kronky Posted July 25, 2015 Author Report Share Posted July 25, 2015 ok, please let me know if that code works for you? Link to comment Share on other sites More sharing options...
Halvhjearne Posted July 25, 2015 Report Share Posted July 25, 2015 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"; Kronky and (HPG) Heavy 2 Link to comment Share on other sites More sharing options...
Kronky Posted July 25, 2015 Author Report Share Posted July 25, 2015 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 More sharing options...
Halvhjearne Posted July 26, 2015 Report Share Posted July 26, 2015 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 More sharing options...
(HPG) Heavy Posted July 26, 2015 Report Share Posted July 26, 2015 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. Kronky 1 Link to comment Share on other sites More sharing options...
Kronky Posted July 26, 2015 Author Report Share Posted July 26, 2015 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 More sharing options...
Kronky Posted July 26, 2015 Author Report Share Posted July 26, 2015 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 More sharing options...
(HPG) Heavy Posted July 26, 2015 Report Share Posted July 26, 2015 I completely agree, but how do we know exactly when is the character spawned? I like your avatar, I can't believe that image is stuck in my brain ... that must be ... Toecutter from Mad Max, right ? Yesh! Have you seen my buddy? The Nightrider? Link to comment Share on other sites More sharing options...
(HPG) Heavy Posted July 26, 2015 Report Share Posted July 26, 2015 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 More sharing options...
Halvhjearne Posted July 27, 2015 Report Share Posted July 27, 2015 waitUntil{!isNull (findDisplay 46) && !dialog && cameraOn isEqualTo player && cameraView == "INTERNAL"}; player switchCamera "EXTERNAL"; this works almost every time, i only see it fail when you are the first player that logs into the server ... Kronky 1 Link to comment Share on other sites More sharing options...
Kronky Posted July 27, 2015 Author Report Share Posted July 27, 2015 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 More sharing options...
Scaris Posted July 27, 2015 Report Share Posted July 27, 2015 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 More sharing options...
Kronky Posted July 27, 2015 Author Report Share Posted July 27, 2015 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 More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now