Jump to content
Sign in to follow this  
dontknowhow

How can I know in what team a unit is?

Recommended Posts

Watch out, I'm talking about a team, not a group. I mean one of those red, green, blue, yellow, white "subgroups" that you choose from the team menu.

I know there is an assignTeam to set a team, but I couldn't find how to get information about it. I even tried to go after the team menu, but I'm afraid handling of the commands is in the main executable.

And, just to explain why I am asking: when team switching the information about team colors is lost. I would like to restore it.

Anybody has an idea?

Share this post


Link to post
Share on other sites

_team = [url=http://community.bistudio.com/wiki/teamName]teamName[/url] unit;

The possible team values are: "MAIN", "RED", "GREEN", "BLUE" and "YELLOW".

Share this post


Link to post
Share on other sites
_team = [url=http://community.bistudio.com/wiki/teamName]teamName[/url] unit;

The possible team values are: "MAIN", "RED", "GREEN", "BLUE" and "YELLOW".

okay, hopefully I'm just too stupid.

I put the cursor on team member number 2. I do

cursorTarget assignTeam "RED"

Or I give a team order, it's the same. Number 2 goes into red team. Now, if I do

teamName cursorTarget

I get an error (error teamname: type object, expected teammember). Which means I have to convert a unit to a teammember. So I do:

teamName call( compile "teamMember cursorTarget" )

and I get nothing.

By the way, thank you for the link. So far I have been mostly using this. I thought it was the same content. But it was obviously a bad idea

Share this post


Link to post
Share on other sites

Why are you trying to manually create a team assignment method when it's built into the game already?

Press BACKSPACE to enter menu mode. Press F4, F5, F6 to select units 4, 5 and 6. Then press 9 for Team and 1 for Assign Team Red.

Their unit numbers will turn red so you can tell at a glance what team they are members of.

You can also do it all from the Spacebar Communications menu. Just Spacebar then Team. That will allow you to issue context sensitive commands to a team.

Share this post


Link to post
Share on other sites
Why are you trying to manually create a team assignment method when it's built into the game already?

Press BACKSPACE to enter menu mode. Press F4, F5, F6 to select units 4, 5 and 6. Then press 9 for Team and 1 for Assign Team Red.

Their unit numbers will turn red so you can tell at a glance what team they are members of.

You can also do it all from the Spacebar Communications menu. Just Spacebar then Team. That will allow you to issue context sensitive commands to a team.

I did that too. As I said, it's the same. I tried again, with a brand new mission previewed in the editor. Just me and another soldier. I pressed F2, 9, and 1. What I just wrote, the error and the empty result, happens again. This time I even tried without addons. Just the debug console

Share this post


Link to post
Share on other sites

dude, sorry to bother, but if you don't have an answer I obviously won't find it :)

Just wanted to know if I can get any further help, or maybe it's time to settle this down.

Share this post


Link to post
Share on other sites

It is not clear what you are asking and that might explain no responses.

Are you asking how to assign a team once you team switched?

If so, you could add asign team command in trigger and activate everytime you team switch. The easy way is to just select units and do it on the go unless you have 50 units in your squad or you are team switching every 30 seconds.

Share this post


Link to post
Share on other sites

One problem might be this "debug console". There isn't one by default, which means you're running something else. Try it stock with no addons. You shouldn't need to script anything, this stuff is just part of the game.

Share this post


Link to post
Share on other sites
It is not clear what you are asking and that might explain no responses.

Well, that by itself is a response :)

Okay, suppose that you have your group, and you split it in blue, red, and green teams. You know, the ones that you can make with the team menu (key 9). Then you switch to one of your teammates. When you switch back, all the colors are gone. Everybody is white. I would like to keep the blue, red and green the way I assigned them.

If so, you could add assign team command in trigger and activate every time you team switch. The easy way is to just select units and do it on the go unless you have 50 units in your squad or you are team switching every 30 seconds.

Yeah, but the thing is that I don't know how to find out who is in the blue, red or green. When I team switch I need to retrieve the information somehow. That's my problem

Please don't run away if it's not clear :)

concerning the "on the go", sure, I could do that; actually, at the moment I don't have a choice. I don't team switch every 30 second, but I like to team switch to makes sure snipers and machine gunners have a good visual. It's not great to have to set colors back every time, especially because I would think that it's quite obvious that colors should stay.

Besides, it's a good chance for me to learn something, and in case you don't know I'm a serious software developer :). I like to make nice stuff

One problem might be this "debug console". There isn't one by default, which means you're running something else. Try it stock with no addons. You shouldn't need to script anything, this stuff is just part of the game.

Are you saying that I should get the colors when I switch back, without writing anything? I would think so, but it doesn't work.

I removed the debug console. I even removed the @myaddons directory I had made. Hell, I even deactivated VAC. If you want I can post my rpt file.

It doesn't work, I'm sorry. If you don't believe it try it out yourself. That would make feel better, considering my level of noobness.

The debug console, by the way, is the pretty standard one:

http://forums.bistudio.com/showthread.php?t=73356

Share this post


Link to post
Share on other sites
_team = [url=http://community.bistudio.com/wiki/teamName]teamName[/url] unit;

The possible team values are: "MAIN", "RED", "GREEN", "BLUE" and "YELLOW".

I'm starting to think that these commands (teamName, createTeam, addTeamMember, deleteTeam, teamType, etc) are related to multiplayer teams, not teams with colors. Not sure it makes sense. They don't seem to be much used anyway.

Man, I have never done so much reverse engineering in my life. I will soon be master hacker. May the code be with me

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×