Author Topic: Iban Explains it All  (Read 24230 times)

I think he means SimSet vs SimGroup.

there IS a difference, and I can never keep it strait.    For one type, an object can only be a member of ONE group/set.  for the other type an object can be a member of any number of groups/sets (but like I said I can never remember which one is which).

actually i was referring to this

But that was T2D, wasn't it...

:o

edit:

But I would MUCH rather learn about SimGroups and SimSets.

actually i was referring to this

But that was T2D, wasn't it...

:o

edit:

But I would MUCH rather learn about SimGroups and SimSets.
I've never even heard of ScriptGroups but apparently they do exist so I'll read up on it.

I'm writing about SimGroups/SimSets now.

I've never even heard of ScriptGroups but apparently they do exist so I'll read up on it.

I'm writing about SimGroups/SimSets now.
ok.

That's probably why when I tried looking for information about them a while ago, I could never find much useful information on it.

Good resource, sometimes I forget things and I just end up being too embarrassed to ask anyone for help.


scriptGroups are the exact same as scriptObjects, except that they are children of the scriptObject and simGroup classes. ScriptGroups are only differing from scriptObjects by that they have .getCount, .getObject, .add, .remove and .isMember.

scriptGroups are the exact same as scriptObjects, except that they are children of the scriptObject and simGroup classes. ScriptGroups are only differing from scriptObjects by that they have .getCount, .getObject, .add, .remove and .isMember.
thanks. c:

I was about to post a topic pertaining to clientside stuff, but this covered my problem. Good work.

I was about to post a topic pertaining to clientside stuff, but this covered my problem. Good work.
Did the thing going through how the client and server talk to each other actually help? I was afraid that was too complicated and/or verbose.

Well I actually already knew most of it. I'm just rusty on torquescript, and needed the syntax for calling a clientsided function from the server.

I need a little help with discerning a client's team.

Code: [Select]
function tellTeam()
{
if(%client.tdmTeam > -1)
{
echo("You are in team "@%client.tdmTeam);
} else if(%client.tdmTeam = -1)
{
echo("You are not in a team!");
}
}

What am I doing wrong?

I don't know how else to better explain server commands.

If you want to be able to put a slash infront of something in chat and have something happen, you need it to be a server command. The structure for a server command is always like this.

function serverCmdCommandName(%client, %word1) - There can be something like 15 "%word#"s.

Also, your if statement is pretty handicapped looking.

Code: [Select]
if(%client.tdmTeam != -1)
messageClient(%client, '', "\c5You are in team" SPC %client.tdmTeam);
else
messageClient(%client, '', "\c5You not on a team.");

You can take the curly-braces out because there is only one statement to be ran if it evaluates true.

An else if is not required because there's only one alternative to what the first if is.

I don't know how else to better explain server commands.

If you want to be able to put a slash infront of something in chat and have something happen, you need it to be a server command. The structure for a server command is always like this.

function serverCmdCommandName(%client, %word1) - There can be something like 15 "%word#"s.

Also, your if statement is pretty handicapped looking.

Code: [Select]
if(%client.tdmTeam != -1)
messageClient(%client, '', "\c5You are in team" SPC %client.tdmTeam);
else
messageClient(%client, '', "\c5You not on a team.");

You can take the curly-braces out because there is only one statement to be ran if it evaluates true.

An else if is not required because there's only one alternative to what the first if is.
No, for client. I know how to structure a server command just fine. I want to be able to join any server, type tellTeam(); into the console and have it return either "You are not in a team" or "You are in team (whatever)".

sigh.

You can't do that. That information is server-side.