Jump to content

Recommended Posts

How would someone change their Faction from west to civilian?

Let's say I'm west now so when I use PlayerSide command it returns west but i wanna change that to return Civ without the player needing to change slot

 

Thanks

Share this post


Link to post
Share on other sites
14 hours ago, Naiss said:

How would someone change their Faction from west to civilian?

Let's say I'm west now so when I use PlayerSide command it returns west but i wanna change that to return Civ without the player needing to change slot

 

Thanks

 

12 hours ago, davidoss said:

 

PlayerSide will return west, even if the player is setCaptive true.

setCaptive only pretends to change sides, a captive west player will still engage east units.

 

To properly change sides you need to use join or joinSilent:

[player] joinSilent createGroup civilian;

Cheers

  • Like 2

Share this post


Link to post
Share on other sites
11 hours ago, killzone_kid said:


This will not change playerSide though

Indeed, weird, the wiki suggests otherwise:

 

Quote

Returns the player's side. This is valid even when the player controlled person is dead (a difference from side player).

 

After reading the comments I decided to do a quick check, playerSide always seems to return the initial side of the player unit (maybe retrieved from Cfg?).

Even after joining east group and setting captive it returns west, the initial side.

So it will be better to check for side player instead.

 

This begs the question of the actual purpose of playerSide, heh.

 

Cheers

  • Like 3

Share this post


Link to post
Share on other sites
7 hours ago, Grumpy Old Man said:

This begs the question of the actual purpose of playerSide, heh.

 

Cheers

 

I'd argue the purpose is perfectly clear even if the wiki isn't. 

 

side player ( or side group player) is for getting the player's current allegiance. It's a fickle tool which can change it's output based on a multitude of parameters. 

 

playerSide is for getting the starting allegiance, something which prior to playerSide's introduction required a config lookup or similar hackery.

 

Something I'd like to test is if selectPlayer affects the result of playerSide. 

  • Like 1

Share this post


Link to post
Share on other sites

So there is not really any simple way of doing this, i remember back in the arma 2 oa days where you should change by just changing the classname of the player if that make sense but then again you where not able to change your clothing etc like in arma 3 so i guess you can't really do it the same way

Share this post


Link to post
Share on other sites
5 minutes ago, Naiss said:

So there is not really any simple way of doing this

Not to be that guy but it helps to read the entire text. 

On 02/01/2019 at 8:05 AM, Grumpy Old Man said:

To properly change sides you need to use join or joinSilent:


[player] joinSilent createGroup civilian;

Cheers

 

Share this post


Link to post
Share on other sites
Just now, mrcurry said:

Not to be that guy but it helps to read the entire text. 

 

I saw that but then I saw killzone_kid said it would not change playerside result 

Share this post


Link to post
Share on other sites
2 minutes ago, Naiss said:

I saw that but then I saw killzone_kid said it would not change playerside result 

Why do you need to use playerSide?

 

Cheers

Share this post


Link to post
Share on other sites

I have a lot of codes that has playerside stuff and i just wanna find a simpler way to change side without needing to go into the lobby or change code

Share this post


Link to post
Share on other sites
6 minutes ago, Naiss said:

I have a lot of codes that has playerside stuff and i just wanna find a simpler way to change side without needing to go into the lobby or change code

Uhm maybe you're not following through on this one or I'm confused but have you tried using

side player

to check for a players side?

As stated above by @mrcurry, read the whole thing, heh.

 

Cheers

Share this post


Link to post
Share on other sites

I will test this later and check

Share this post


Link to post
Share on other sites
7 hours ago, Naiss said:

Tested your code and it changes the "side player" result but it does not change "playerside"

This says nothing to me. I tested it too and it works. If you give more details maybe I can give you an answer

 

 

Share this post


Link to post
Share on other sites
10 hours ago, killzone_kid said:

This says nothing to me. I tested it too and it works. If you give more details maybe I can give you an answer

 

 

I ran your code in the debug console from the wiki that you added and before it displayed CIV when I use side player the first time but once I ran your code it showed east but not with playerSide, it does not seem to update the playerSide, it still does only return Civ when I use playerSide but side player returns east as it should if that make sense

Share this post


Link to post
Share on other sites
1 hour ago, Naiss said:

I ran your code in the debug console from the wiki that you added and before it displayed CIV when I use side player the first time but once I ran your code it showed east but not with playerSide, it does not seem to update the playerSide, it still does only return Civ when I use playerSide but side player returns east as it should if that make sense

Elaborate further on how the initial sides have been set up, was the unit initially civ (editor placed civilian)?

 

Cheers

Share this post


Link to post
Share on other sites
On 1/7/2019 at 9:44 AM, Naiss said:

I ran your code in the debug console from the wiki that you added and before it displayed CIV when I use side player the first time but once I ran your code it showed east but not with playerSide, it does not seem to update the playerSide, it still does only return Civ when I use playerSide but side player returns east as it should if that make sense


xBpCyrQ.jpg

Share this post


Link to post
Share on other sites
11 hours ago, killzone_kid said:


xBpCyrQ.jpg

 

I had the civilian placed down in the editor and ran the code on MP and there is no west or east units placed down, do i need to have west and east placed down or?

Share this post


Link to post
Share on other sites
48 minutes ago, Naiss said:

ran the code on MP

Duh! The selectNoPlayer doesn't work in MP,. you should have checked wiki

Share this post


Link to post
Share on other sites
1 minute ago, killzone_kid said:

Duh! The selectNoPlayer doesn't work in MP,. you should have checked wiki

oh wow, my bad

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

×