From unsynced, how do I find out what faction I (the widget owner) am?
Posted: 01 Jan 2020, 09:23
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:
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)