Page 1 of 1

From unsynced, how do I find out what faction I (the widget owner) am?

Posted: 01 Jan 2020, 09:23
by Forboding Angel
In other words, I want to have a widget perform an action based upon the faction that a player happens to be.

The problem is that I can't seem to find anywhere examples of how to get my faction.

I thought that I could use one of these Spring.GetMyTeamID Spring.GetMyAllyTeamID Spring.GetMyPlayerID, but I seem to not be able to figure out where to go beyond that.

Edit:
In my widget, this returns a blank line when echoed:

Code: Select all

myTeamID = Spring.GetMyTeamID()
_,_,_,_,mySide = Spring.GetTeamInfo(myTeamID, leader, isDead, isAiTeam, "side")
Spring.Echo(mySide)

Re: From unsynced, how do I find out what faction I (the widget owner) am?

Posted: 01 Jan 2020, 14:47
by Forboding Angel
I have solved this using a TeamRulesParam (and a lot of help from ivand). When I get up I'll go into more detail in the offchance that it'll be useful to others.