How do you get a PlayerPawn setting?

Discussions about Coding and Scripting
Post Reply
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

How do you get a PlayerPawn setting?

Post by UT Sniper (SJA94) »

Probably a stupid question, how do you get a setting like MouseSensitivity,FOV from a player on an online game?

I've only been able to get the severs setting using PlayerPawn(playerReplicationInfo), am I missing something simple like using the wrong function in the mutator class(Currently it's in ModifyPlayer), or will I have to make a new replication class for players.

Mutator snippet:

Code: Select all


if(PlayerPawn(p) != None){

	Level.Game.LocalLog.LogEventString(PlayerPawn(p).Player.CurrentNetSpeed);
	Level.Game.LocalLog.LogEventString(PlayerPawn(p).MouseSensitivity);
	Level.Game.LocalLog.LogEventString(PlayerPawn(p).DodgeClickTime);
	Level.Game.LocalLog.LogEventString(PlayerPawn(p).FovAngle);

}			
			
		

User avatar
Gustavo6046
Godlike
Posts: 1462
Joined: Mon Jun 01, 2015 7:08 pm
Personal rank: Resident Wallaby
Location: Porto Alegre, Brazil
Contact:

Re: How do you get a PlayerPawn setting?

Post by Gustavo6046 »

It's PlayerReplicationInfo.Owner. You can't change an Info subclass reference to a Pawn subclass reference.
"Everyone is an idea man. Everybody thinks they have a revolutionary new game concept that no one else has ever thought of. Having cool ideas will rarely get you anywhere in the games industry. You have to be able to implement your ideas or provide some useful skill. Never join a project whose idea man or leader has no obvious development skills. Never join a project that only has a web designer. You have your own ideas. Focus on them carefully and in small chunks and you will be able to develop cool projects."

Weapon of Destruction
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: How do you get a PlayerPawn setting?

Post by sektor2111 »

Jack Griffin was talking about a small tool capturing key settings from client and logging them in server. Keys are stored in User.ini as other settings, I think it's possible in the same way to gain settings from main UT.ini and to process/log them in server. Else for restoring some default values you might use whatever actor spawned only in client and processing there silently. I would say more but I have to do more experiments first for figuring how goes replication deal if something is borked in client for being reported in server.
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

Re: How do you get a PlayerPawn setting?

Post by UT Sniper (SJA94) »

I'll put this on hold for now, I looked through other code like SmartCTF and SmartDM, it's seems like a lot more faffing around then I originally thought for the little thing I wanted to do for NodeUTStats(netspeed, fov, mouse sens, setting fetching), I'm pretty stupid so not surprised I struggled to get this to work.

I'll try and do this at a later point if my 2 brain cells decide to work, I'm close to releasing the first beta NodeUTStats.
Post Reply