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

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

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

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

Post 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)
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

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

Post 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.
Post Reply

Return to “Game Development”