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

Unless of course you know exactly how the message looks when you join a team, and are hooked to the chat waiting for it, and then save it in a variable.


Unless of course you know exactly how the message looks when you join a team, and are hooked to the chat waiting for it, and then save it in a variable.
Do "/teamlist" or "/teamcount" and you get a list of all teams in ID order to compare the message to.

What about discerning team through name color?

Isn't that server to client?

yeah, but I don't think there is a "getShapeNameColor" function. Even then, it wouldn't have a list of team names with colors you could compare it to.

an easier way of seeing what team you're on is to press tab and look at your clothes.

yeah, but I don't think there is a "getShapeNameColor" function. Even then, it wouldn't have a list of team names with colors you could compare it to.

an easier way of seeing what team you're on is to press tab and look at your clothes.
Hilarious.

Is there any way at all for a script to know who is on a team? Even if you have to type in several names/id's?

Iban, how did you get it so your (or striker150's) health gui for ZAPT goes to the right bottom corner of the screen, even if the player has a different resolution?

Hilarious.

Is there any way at all for a script to know who is on a team? Even if you have to type in several names/id's?
Either modify Space Guy's stuff or just loving ask in chat like a normal person.

There is no client-side identifiers for what you're asking. If there was, Space Guy or I would have said so by now. You're just going to have to stop being so loving lazy and find out.


Iban, how did you get it so your (or striker150's) health gui for ZAPT goes to the right bottom corner of the screen, even if the player has a different resolution?
I don't remember.

Iban, how did you get it so your (or striker150's) health gui for ZAPT goes to the right bottom corner of the screen, even if the player has a different resolution?

$Pref::Video::Resolution. Deal with it, then adjust position of GUI.
Sorry for answering questions not put to me :/

The only thing resolution had to do with the GUI code is with how many player's information we could display.

There is another way to position an element at X, Y from the Bottom Right.

vertSizing and horizSizing properties in the GUI.

I have another question.

How would I go about getting the position of a brick I am looking at?
As in, type /getbrickposition and you will get the xyz coordinates of the brick that is in your direct line of sight.

Things I know:
I can't find a default function for this
The only thing close to it is /GetId, which is kind of what I want this to behave like
I know the final line has to be something like echo(id.getposition());

Things I don't know:
If I do use a combination of ServerCmdGetId and getWord, which string should I search in?
And basically everything else


I believe myself to be fairly intelligent, scripting just does not come naturally to me.
Any help would be appreciated greatly.

I have another question.

How would I go about getting the position of a brick I am looking at?
As in, type /getbrickposition and you will get the xyz coordinates of the brick that is in your direct line of sight.

Things I know:
I can't find a default function for this
The only thing close to it is /GetId, which is kind of what I want this to behave like
I know the final line has to be something like echo(id.getposition());

Things I don't know:
If I do use a combination of ServerCmdGetId and getWord, which string should I search in?
And basically everything else
Your going to need to make a copy of the insides of serverCmdGetID -- I dont know where you will find that.

but the concept is this:
player types: /getbrickposition
you write function serverCmdGetbrickposition(%client)

and inside you do this:
  - do a "raycast" to findout the brick the player is looking at
     that will eventually give you a brick.
  - use: echo(%brick.getposition() );   or MessageClient( )   to display the position.

the raycast thing is used in several places...  I use a copy in my own stuff, but I cant remember which mod I copied it from.

Here is the basis for that Treynolds:

%obj would be the player of the client who calls the command.
Code: [Select]
%scale = vectorScale(%obj.getEyeVector(),100);
%ray = containerRaycast(%obj.getEyePoint(),%scale,$Typemasks::fxBrickObjectType);
if(isObject(firstWord(%ray)))
{
   %brick = firstWord(%ray);
   Announce(%brick.getPosition());
}
This is untested and written from my phone, but feel free to take it and try it out/mess with it

Is there a list of default functions somewhere?

Or will I have to scavenge for them by tracing?