Get a team's alliance ID?

Get a team's alliance ID?

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
Pithikos
Posts: 146
Joined: 26 Dec 2008, 14:26

Get a team's alliance ID?

Post by Pithikos »

I want to get the the allyTeamID (the alliance ID) from a given team. So far I tryied to use the Spring.GetTeamInfo(teamID) but it returns always nil.
Code:

Code: Select all

local _, _, _, _, side, allyTeam=Spring.GetTeamInfo(attackerID)	
attackerID is an existing teamID, so already checked.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Get a team's alliance ID?

Post by knorke »

attackerID is an existing teamID, so already checked.
are you sure it is a teamID and not a unitID?
User avatar
Pithikos
Posts: 146
Joined: 26 Dec 2008, 14:26

Re: Get a team's alliance ID?

Post by Pithikos »

knorke wrote:
attackerID is an existing teamID, so already checked.
are you sure it is a teamID and not a unitID?
Ok I fixed that. I used attackerID instead of attackerTeam :lol:
Post Reply

Return to “Lua Scripts”