Jump to content
Sign in to follow this  
ANSWER

HOW to make Only Squad Leader(or higher rank soldier) Use 3rd person view?

Recommended Posts

I can make this script if i know 3rd person view related codes in BI WIKI

do you know it?

purpose : Squad Leaders need more sight, for control and commanding

Share this post


Link to post
Share on other sites

Do you just want to know the commands or can I write the script for you (please)

switchCamera, cameraView, rank

---------- Post added at 23:28 ---------- Previous post was at 23:16 ----------

Sorry, I thought this was actually pretty cool so I went ahead and wrote it anyway. This script takes "strings" that are the rank names. You can find all of the rank names inside the script in an array called _ranks. Also you have a choice between using hints or systemchat to inform noobish players that they are not allowed to use 3rd person (I have commented out the systemchat command, just delete the // and put // in front of hintSilent)

_ranks = ["PRIVATE","CORPORAL","SERGEANT","LIEUTENANT","CAPTAIN","MAJOR","COLONEL"];
_required = _ranks find _this;

while {true} do
{
waitUntil {cameraView == "EXTERNAL"};
if (_ranks find (rank player) >= _required) then
{
}else
{
	player switchCamera "INTERNAL";
	hintSilent format ["Only %1s or higher can use 3rd person view.", _this];
	//systemChat format ["Only %1s or higher can use 3rd person view.", _this];
};

};

Edited by DreadedEntity

Share this post


Link to post
Share on other sites
Do you just want to know the commands or can I write the script for you (please)

switchCamera, cameraView, rank

---------- Post added at 23:28 ---------- Previous post was at 23:16 ----------

Sorry, I thought this was actually pretty cool so I went ahead and wrote it anyway. This script takes "strings" that are the rank names. You can find all of the rank names inside the script in an array called _ranks. Also you have a choice between using hints or systemchat to inform noobish players that they are not allowed to use 3rd person (I have commented out the systemchat command, just delete the // and put // in front of hintSilent)

_ranks = ["PRIVATE","CORPORAL","SERGEANT","LIEUTENANT","CAPTAIN","MAJOR","COLONEL"];
_required = _ranks find _this;

while {true} do
{
waitUntil {cameraView == "EXTERNAL"};
if (_ranks find (rank player) >= _required) then
{
}else
{
	player switchCamera "INTERNAL";
	hintSilent format ["Only %1s or higher can use 3rd person view.", _this];
	//systemChat format ["Only %1s or higher can use 3rd person view.", _this];
};

};

I LOVE YOU MAN I LOVE ARMA FORUM very thank you Bro

---------- Post added at 07:58 ---------- Previous post was at 07:35 ----------

Hm... i have a problem this script didnt work

i wrote Addaction code to Backpack (just backpack) and i used but it didnt work i dont know what is problem

thirdpersonview.sqf (your script)

this addaction ["3rd","thirdpersonview.sqf"]; (my code in backpack init)

Share this post


Link to post
Share on other sites

afaik you have to give the script the needed parameter (rank player).

so something like

this addaction ["3rd","thirdpersonview.sqf",rank player];

and on top of the sqf :

_this = _this select 0;

ps: sry, cant test on mobile ^^

Share this post


Link to post
Share on other sites

Okay so just save that code into a script, then you can run it like:

"RANK" execVM "myScript.sqf";

So like:

"SERGEANT" execVM "limitView.sqf";

That makes it so that only units that are ranked sergeant and above can look in 3rd person

Share this post


Link to post
Share on other sites
afaik you have to give the script the needed parameter (rank player).

so something like

this addaction ["3rd","thirdpersonview.sqf",rank player];

and on top of the sqf :

_this = _this select 0;

ps: sry, cant test on mobile ^^

didnt work I made same thing you suggested

---------- Post added at 11:37 ---------- Previous post was at 11:33 ----------

Okay so just save that code into a script, then you can run it like:

"RANK" execVM "myScript.sqf";

So like:

"SERGEANT" execVM "limitView.sqf";

That makes it so that only units that are ranked sergeant and above can look in 3rd person

didnt work , i wrote that code on Trigger and other SQF files but didnt work

i think this is some kind of variable or syntax problem

If you have a little time ...(i wish)

Could you make a example mission for us?(40 mankind who want this script) :)

Share this post


Link to post
Share on other sites
didnt work

-showScriptErrors

Also, tell me more, "didnt work" doesn't help anybody

---------- Post added at 12:58 ---------- Previous post was at 12:51 ----------

Example Mission

Share this post


Link to post
Share on other sites

just a thought, doesn't the squad leader have a 'tactical view' (just checked in key config) used by pressing "numpad ."?

if I recall it is a situation view for the squad. not sure if it works with MP though.

Is this locked out if 3dp is locked on server?

Share this post


Link to post
Share on other sites
-showScriptErrors

Also, tell me more, "didnt work" doesn't help anybody

---------- Post added at 12:58 ---------- Previous post was at 12:51 ----------

Example Mission

Im very sorry for omissions, but because im korean and not educated english by native, i cant write exact problem on forum (even in korean language, 죄송[sorry])

so.. my fault sorry.. ill check Example Mission right now very sorry...

---------- Post added at 06:43 ---------- Previous post was at 06:37 ----------

it worked!!!! thank you thank you DE :yay:

I think i misunderstand the method ê°ì‚¬[thank you]

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  

×