<RetVar/IF> <RefObj> get object class

This forum serves as MSCI Reference at EGOSOFT. It's Read-Only for non MSCI Group members.

Moderators: Scripting / Modding Moderators, MSCI Moderators

Locked
User avatar
Serial Kicked
Posts: 3823
Joined: Fri, 12. Aug 05, 20:46
x3tc

<RetVar/IF> <RefObj> get object class

Post by Serial Kicked » Tue, 7. Sep 10, 21:37

[skip|else] if [not]|while [not]|<RetVar/IF> = <RefObj> -> get object class


[skip|else] if [not]|while [not]| = The possible 'conditional' statements that can be used with this command.
<RetVar/IF> = variable where the requested information is put
<RefObj> = The object you want to check


This function returns the class of an object. It works for all objects including but not limited to ships, sectors, asteroids, stations, flying wares.

If the <RefObj> doesn't exists, the result in <RetVar/IF> will be null


Example:
$my.class = [PLAYERSHIP] -> get object class
write to player logbook $my.class

This example will write the class of the ship piloted by the player in the logbook.


Related Commands:

<RetVar/IF> = <RefObj> -> if of class <Var/Class>


Additional Information:

List of Ingame Object Classes.


Command Location:
Last edited by Serial Kicked on Tue, 7. Sep 10, 22:42, edited 1 time in total.

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24961
Joined: Sun, 2. Apr 06, 16:38
x4

[TiP][49] 286418

Post by X2-Illuminatus » Mon, 31. Jan 11, 16:43

[skip|else] if [not]|while [not]|<RetVar/IF> = <RefObj> -> get object class


[skip|else] if [not]|while [not]| = Die möglichen bedingten Anweisungen, die mit diesem Befehl genutzt werden können.
<RetVar/IF> = Variable, in der die geforderte Information gespeichert wird.
<RefObj> = Das Objekt, das überprüft werden soll.


Dieser Befehl gibt die Klasse eines Objektes zurück. Er funktioniert für alle Objekte einschließlich (aber nicht beschränkt auf) Schiffe, Sektoren, Asteroiden, Stationen, im Raum treibende Waren.

Wenn das <RefObj> nicht existiert, wird das Ergebnis in <RetVar/IF> gleich null sein.


Beispiel:
$my.class = [PLAYERSHIP] -> get object class
write to player logbook $my.class

Dieses Beispiel wird die Klasse des Schiffes, das gerade vom Spieler geflogen wird, ins Logbuch schreiben.


Ähnliche Befehle:

<RetVar/IF> = <RefObj> -> if of class <Var/Class>


Zusätzliche Information:

Liste der spielinternen Objektklassen.


Zu finden unter:

Locked

Return to “MSCI Reference”