Update the visibility docs.

Very small fix to C4Object::IsVisible
Julius Michaelis 2011-09-05 17:13:44 +02:00
parent f389ee0781
commit c1123cff55
15 changed files with 158 additions and 449 deletions

View File

@ -10,14 +10,14 @@ msgid ""
msgstr ""
"Project-Id-Version: OpenClonk documentation\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-08-02 16:15+0200\n"
"POT-Creation-Date: 2011-09-05 22:05+0200\n"
"PO-Revision-Date: 2011-07-01 15:00+0100\n"
"Last-Translator: Benedict Etzel <benedict.etzel@gmail.com>\n"
"Language-Team: German <>\n"
"Language: German\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: German\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: sdk/content.xml.in:5(title)
@ -388,6 +388,7 @@ msgstr "Operator"
#: sdk/folder/foldermap.xml:16(col)
#: sdk/folder/foldermap.xml:46(col)
#: sdk/folder/foldermap.xml:71(col)
#: sdk/definition/visibility.xml:19(col)
#: sdk/definition/script.xml:53(col)
#: sdk/definition/properties.xml:26(col)
#: sdk/definition/procedures.xml:13(col)
@ -1347,13 +1348,6 @@ msgstr "Entfernt alle Objekte."
#: sdk/script/fn/this.xml:8(category)
#: sdk/script/fn/VerticesStuck.xml:8(category)
#: sdk/script/fn/VIS_Owner.xml:8(category)
#: sdk/script/fn/VIS_None.xml:8(category)
#: sdk/script/fn/VIS_Local.xml:8(category)
#: sdk/script/fn/VIS_God.xml:8(category)
#: sdk/script/fn/VIS_Enemies.xml:8(category)
#: sdk/script/fn/VIS_Allies.xml:8(category)
#: sdk/script/fn/VIS_All.xml:8(category)
#: sdk/script/fn/Stuck.xml:8(category)
#: sdk/script/fn/Split2Components.xml:8(category)
#: sdk/script/fn/Sort_Value.xml:8(category)
@ -1370,7 +1364,6 @@ msgstr "Entfernt alle Objekte."
#: sdk/script/fn/ShakeObjects.xml:8(category)
#: sdk/script/fn/SetYDir.xml:8(category)
#: sdk/script/fn/SetXDir.xml:8(category)
#: sdk/script/fn/SetVisibility.xml:8(category)
#: sdk/script/fn/SetVertexXY.xml:8(category)
#: sdk/script/fn/SetVertex.xml:8(category)
#: sdk/script/fn/SetTransferZone.xml:8(category)
@ -1462,7 +1455,6 @@ msgstr "Entfernt alle Objekte."
#: sdk/script/fn/GetY.xml:8(category)
#: sdk/script/fn/GetXDir.xml:8(category)
#: sdk/script/fn/GetX.xml:8(category)
#: sdk/script/fn/GetVisibility.xml:8(category)
#: sdk/script/fn/GetVertexNum.xml:8(category)
#: sdk/script/fn/GetVertex.xml:8(category)
#: sdk/script/fn/GetValue.xml:8(category)
@ -1765,83 +1757,6 @@ msgstr "Liefert die Anzahl feststeckender Vertices von *obj"
msgid "Removes obj if two or more of its vertices are stuck."
msgstr "Entfernt obj wenn zwei oder mehr seiner Vertices feststecken."
#: sdk/script/fn/VIS_Owner.xml:9(subcat)
#: sdk/script/fn/VIS_None.xml:9(subcat)
#: sdk/script/fn/VIS_Local.xml:9(subcat)
#: sdk/script/fn/VIS_God.xml:9(subcat)
#: sdk/script/fn/VIS_Enemies.xml:9(subcat)
#: sdk/script/fn/VIS_Allies.xml:9(subcat)
#: sdk/script/fn/VIS_All.xml:9(subcat)
#: sdk/script/fn/SetVisibility.xml:9(subcat)
#: sdk/script/fn/GetVisibility.xml:9(subcat)
#: sdk/script/fn/CheckVisibility.xml:9(subcat)
msgid "Visibility"
msgstr "Sichtbarkeit"
#: sdk/script/fn/VIS_Owner.xml:12(desc)
msgid "Constant for <placeholder-1/>/<placeholder-2/>. The object is visible for its owner."
msgstr "Konstante für <placeholder-1/>/<placeholder-2/>. Das Objekt ist für den Besitzer sichtbar."
#: sdk/script/fn/VIS_Owner.xml:16(text)
msgid "Makes all clonks that are in a crew visible for their owners only."
msgstr "Macht alle Clonks in Crews nur noch für ihre Besitzer sichtbar."
#: sdk/script/fn/VIS_None.xml:12(desc)
msgid "Constant for <placeholder-1/>/<placeholder-2/>. The object is not visible for anybody."
msgstr "Konstante für <placeholder-1/>/<placeholder-2/>. Das Objekt ist für niemanden sichtbar."
#: sdk/script/fn/VIS_None.xml:16(text)
msgid "Makes all wipfs invisible."
msgstr "Macht alle Wipfe unsichtbar."
#: sdk/script/fn/VIS_Local.xml:12(desc)
msgid "Constant for <placeholder-1/>/<placeholder-2/>. The object's visibility depends on the values in the object's indexed local variables. Each local variable may contain bits for 32 players in a bit mask."
msgstr "Konstante für <placeholder-1/>/<placeholder-2/>. Die Sichtbarkeit eines Objekts richtet sich jeweils nach den unbenannten, lokalen Variablen in diesem Objekt. Dabei können in jeder lokalen Variable 32 Spieler in einer Bitmaske festgelegt werden."
#: sdk/script/fn/VIS_Local.xml:16(text)
msgid "The calling object is only visible for players 0 and 3."
msgstr "Das aufrufende Objekt ist nur noch für Spieler 0 und Spieler 3 sichtbar"
#: sdk/script/fn/VIS_Local.xml:20(text)
msgid "The calling object is only visible for player 33."
msgstr "Das aufrufende Objekt ist nur noch für Spieler 33 sichtbar"
#: sdk/script/fn/VIS_Local.xml:24(text)
msgid "The calling object will be visible to its owner only (same as <placeholder-1/>)."
msgstr "Das aufrufende Objekt ist nur noch von seinem Besitzer sichtbar (entspricht <placeholder-1/>)"
#: sdk/script/fn/VIS_God.xml:12(desc)
msgid "Constant for <placeholder-1/>/<placeholder-2/>. The object is only visible in general viewports (editor or observer viewports)."
msgstr "Konstante für <placeholder-1/>/<placeholder-2/>. Das Objekt ist nur im allgemeinen Viewport (Sichtfenster im Entwicklermodus oder Spielfläche im Netzwerk ohne Spieler) sichtbar."
#: sdk/script/fn/VIS_God.xml:16(text)
msgid "A chest is now only visible in general viewports."
msgstr "Eine Truhe ist nur noch in allgemeinen Viewports sichtbar."
#: sdk/script/fn/VIS_Enemies.xml:12(desc)
msgid "Constant for <placeholder-1/>/<placeholder-2/>. The object is visible for all enemires of the owner."
msgstr "Konstante für <placeholder-1/>/<placeholder-2/>. Das Objekt ist für alle Feinde des Besitzers sichtbar."
#: sdk/script/fn/VIS_Enemies.xml:17(text)
msgid "All banners are only visible for the individual enemies of their owners."
msgstr "Alle Banner sind nur noch für die jeweiligen Gegner der besitzenden Spieler sichtbar."
#: sdk/script/fn/VIS_Allies.xml:12(desc)
msgid "Constant for <placeholder-1/>/<placeholder-2/>. The object is visible for all allies of the owner."
msgstr "Konstante für <placeholder-1/>/<placeholder-2/>. Das Objekt ist für alle Verbündeten des Besitzers sichtbar."
#: sdk/script/fn/VIS_Allies.xml:16(text)
msgid "Makes all selected clonks visible to their owners or their allies only."
msgstr "Macht alle gesteuerten Clonks nur noch für ihre Besitzer und deren Verbündete sichtbar."
#: sdk/script/fn/VIS_All.xml:12(desc)
msgid "Constant for <placeholder-1/>/<placeholder-2/>. The object is visible for all. This is the default value 0 and kann logically not be combined with other VIS_x values."
msgstr "Konstante für <placeholder-1/>/<placeholder-2/>. Das Objekt ist für alle sichtbar. Dieser Wert entspricht 0, und kann logischerweise nicht mit anderen VIS_x-Werten kombiniert werden."
#: sdk/script/fn/VIS_All.xml:16(text)
msgid "Makes all objects visible."
msgstr "Macht alle Objekte sichtbar."
#: sdk/script/fn/Translate.xml:17(desc)
msgid "String to translate"
msgstr "Zeichenkette, die übersetzt werden soll"
@ -2764,22 +2679,6 @@ msgstr "Setzt das Vermögen eines Spielers."
msgid "Brankrupts player number six."
msgstr "Ruiniert den sechsten Spieler."
#: sdk/script/fn/SetVisibility.xml:17(desc)
msgid "Bit mask defining the new visibility.<br/> Either <placeholder-1/> or <placeholder-2/> or a bit mask of <placeholder-3/>, <placeholder-4/>, <placeholder-5/>, <placeholder-6/>, and <placeholder-7/>."
msgstr "Bitmaske, die die neue Sichtbarkeit angibt.<br/> Entweder <placeholder-1/> oder <placeholder-2/>, oder eine Bitmaske aus <placeholder-3/>, <placeholder-4/>, <placeholder-5/>, <placeholder-6/> und <placeholder-7/>."
#: sdk/script/fn/SetVisibility.xml:21(desc)
msgid "Changes the visibility of an object. Objects can be made invisible for any group of players by providing a bit mask in dwVisibility."
msgstr "Verändert die Sichtbarkeit eines Objekts. Objekte können für beliebige Gruppen sichtbar gemacht werden, indem für dwVisibility eine Bitmaske angegeben wird."
#: sdk/script/fn/SetVisibility.xml:25(text)
msgid "Makes the selected clonk of player 0 completely invisible."
msgstr "Macht den ausgewählten Clonk von Spieler 0 völlig unsichtbar."
#: sdk/script/fn/SetVisibility.xml:29(text)
msgid "Makes the selected clonk of player 0 only visible for his owner and allies."
msgstr "Macht den ausgewählten Clonk von Spieler 0 nur für sich und Verbündete sichtbar."
#: sdk/script/fn/SetViewOffset.xml:9(subcat)
#: sdk/script/fn/SetPlrViewRange.xml:9(subcat)
#: sdk/script/fn/SetPlrView.xml:9(subcat)
@ -6296,18 +6195,6 @@ msgstr "Liefert die Windstärke und Richtung an der Position X, Y. Wird die Funk
msgid "Returns the wealth of a player."
msgstr "Liefert das Vermögen von owner."
#: sdk/script/fn/GetVisibility.xml:17(desc)
msgid "Player of which to retrieve the visibility. Can be 0 in local calls."
msgstr "Spieler für den die Sichtbarkeit abgefragt wird. 0 bei lokalem Aufruf."
#: sdk/script/fn/GetVisibility.xml:22(desc)
msgid "Returns the current visibility of an object. Also see <placeholder-1/>."
msgstr "Fragt die Sichtbarkeit eines Objekts ab. Siehe dazu auch <placeholder-1/>."
#: sdk/script/fn/GetVisibility.xml:27(text)
msgid "If the calling object is not visible for its owner, it will be made so."
msgstr "Wenn das aufrufende Objekt nicht für den Besitzer sichtbar war, wird es für ihn sichtbar gemacht."
#: sdk/script/fn/GetVertexNum.xml:12(desc)
msgid "Returns the number of vertices of an object."
msgstr "Liefert die Anzahl der Vertices des aufrufenden Objekts."
@ -9239,6 +9126,13 @@ msgstr "Entfernt alle Einträge aus einem Menü."
msgid "Opens a text window containing the entry \"Old Text\" for the selected clonk. Then changes the entry to \"New Text\"."
msgstr "Öffnet zunächst ein Textfenster mit dem Inhalt \"Alter Text\" für den ausgewählten Clonk des ersten Spielers, und ändert die Beschriftung dann später auf \"Neuer Text\"."
#: sdk/script/fn/CheckVisibility.xml:9(subcat)
#: sdk/script/fn/CheckVisibility.xml:24(emlink)
#: sdk/definition/visibility.xml:6(title)
#: sdk/definition/visibility.xml:7(h)
msgid "Visibility"
msgstr "Sichtbarkeit"
#: sdk/script/fn/CheckVisibility.xml:17(desc)
msgid "Player whose visibility to determine."
msgstr "Spieler für den die Sichtbarkeit abgefragt wird."
@ -9247,6 +9141,10 @@ msgstr "Spieler für den die Sichtbarkeit abgefragt wird."
msgid "Checks whether this object is visible for the given player."
msgstr "Prüft ob dieses Objekt für den angegebenen Spieler sichtbar ist."
#: sdk/script/fn/CheckVisibility.xml:23(related)
msgid "<placeholder-1/>-Property"
msgstr "<placeholder-1/>-Eigenschaft"
#: sdk/script/fn/CheckEffect.xml:16(desc)
#: sdk/script/fn/AddEffect.xml:16(desc)
msgid "Name of the effect without prepended 'Fx'."
@ -10083,6 +9981,7 @@ msgstr "base_mode"
#: sdk/material/ocm.xml:288(col)
#: sdk/material/ocm.xml:313(col)
#: sdk/material/ocm.xml:342(col)
#: sdk/definition/visibility.xml:18(col)
#: sdk/definition/properties.xml:24(col)
msgid "Name"
msgstr "Name"
@ -14980,6 +14879,50 @@ msgstr "Mit dem Menüsystem von Clonk lassen sich Gruppendateien bearbeiten und/
msgid "Unpacking group files greatly increases speed while editing large or deeply nested groups."
msgstr "Das Entpacken von Gruppen liefert vor allem einen Geschwindigkeitsvorteil beim Bearbeiten von größeren oder verschachtelten Dateien."
#: sdk/definition/visibility.xml:9(text)
msgid "Every object has a <emlink href=\"definition/properties.html\">property</emlink>, which controls its visibility for players. It may be either <placeholder-1/> or <placeholder-2/> or a bit mask of <placeholder-3/>, <placeholder-4/>, <placeholder-5/> and <placeholder-6/>, or an array starting with <placeholder-7/> followed by bools setting the visibility for each player. If the object has a layer, it will only be visible if the layer is visible, unless <placeholder-8/> is set for the layer."
msgstr "Jedes Objekt hat eine <emlink href=\"properties.html\">Property</emlink>, die seine Sichtbarkeit steuert. Diese Property verschieden gesetzt werden: entweder auf <placeholder-1/> oder auf <placeholder-2/> oder auf eine Bitmaske aus <placeholder-3/>, <placeholder-4/>, <placeholder-5/> und <placeholder-6/> oder auf ein Array, dessen erstes Element <placeholder-7/> ist, die weiteren Elemente geben dann boolsch die Sichtbarkeit für jeden Spieler einzeln an. Wenn ein Objekt ein Layer hat ist es nur sichtbar, wenn das Layer sichtbar ist, es sei denn <placeholder-8/> ist für das layer gesetzt."
#: sdk/definition/visibility.xml:16(caption)
msgid "VIS_-Constants"
msgstr "VIS_-Konstanten"
#: sdk/definition/visibility.xml:23(col)
msgid "Visible for anyone"
msgstr "Sichtbar für jeden"
#: sdk/definition/visibility.xml:27(col)
msgid "Visible for noone"
msgstr "Sichtbar für niemanden"
#: sdk/definition/visibility.xml:31(col)
msgid "Visible for the owner"
msgstr "Sichtbar für den Besitzer"
#: sdk/definition/visibility.xml:35(col)
msgid "Visible for the owners allies (not for the owner)"
msgstr "Sichtbar für Spieler, die mit dem Besitzer verbündet sind"
#: sdk/definition/visibility.xml:39(col)
msgid "Visible for any player hostile to the owner"
msgstr "Sichtbar für Spieler, die mit dem Besitzer verfeindet sind."
#: sdk/definition/visibility.xml:43(col)
msgid "Is ignored when the property is not an array. If set, the object is visible if the element at position (playernumber+1) is true. Try and avoid using it, you will have to update it on hostility changes and player joins."
msgstr "Wird ignoriert wenn Visibility kein Array ist. Wenn gesetzt, ist das Objekt für die Spieler sichtbar, für die das Element bei (Spielernummer+1) boolsch wahr ist."
#: sdk/definition/visibility.xml:47(col)
msgid "Visible for spectators and in playerless editor windows"
msgstr "Sichtbar für Zuschauer und spielerlose Editorfenster"
#: sdk/definition/visibility.xml:51(col)
msgid "For layers. Make the layer's objects visible when their layer is invisible and vice versa."
msgstr "Für Layer. Macht die Objekte des Layers sichtbar wenn das Layer unsichtbar ist und umgekehrt."
#: sdk/definition/visibility.xml:55(col)
msgid "Only overlays will be visible, other visibility-rules still apply."
msgstr "Nur Overlays sind sichtbar, andere Regeln werden weiterhin angewendet."
#: sdk/definition/vertices.xml:8(text)
msgid "Vertices are the collision points of an object. The outer shape of the object should be rougly marked by vertices. In most cases, four to five vertices are sufficient. Vertex coordinates are relative to the object center.<br/><br/>At these points it is checked whether the object has collided with solid material in the landscape. If an object collides with the landscape, it is slowed down, rotated and/or deviated into another direction. If a vertex gets covered by solid material teh object will be stuck. The friction value of a vertex determines how easily the object will slide at that corner.<br/><br/>If a vertex contains a direction indication (see <emlink href=\"definition/cnat.html\">CNAT - ContactAttachment</emlink>) and ContactCalls are specified, the corresponding contact functions are called in the object script. In this way, an object might react to hitting a wall on the left, the ground at the bottom, etc.<br/><br/>If the object has a SolidMask you should take care that each vertex has at least one pixel of space from the solid area, else the object will be stuck in itself."
msgstr "Vertices sind die Kollisionspunkte eines Objekts. Der Umriss eines Objekts sollte grob durch Vertices markiert sein. Meist reichen hierbei vier bis fünf Eckpunkte. Die Koordinaten der Eckpunkte gelten in Relation zur Objektmitte. An diesen Punkten wird überprüft, ob das Objekt mit festen Materialien in der Landschaft kollidiert. Stößt ein Objekt mit einem Vertex gegen festes Material, so wird es entsprechend anhalten, seine Richtung ändern oder sich drehen (die Vertices drehen sich hierbei natürlich mit). Wird ein Eckpunkt eines Objekts durch ein festes Material verschüttet, so hängt das Objekt fest. Die Reibung eines Vertex bestimmt, wie leicht das Objekt an diesem Punkt abrutscht. Ist einem Vertex eine Ausrichtung zugeordnet (siehe <emlink href=\"definition/cnat.html\">CNAT - ContactAttachment</emlink>), so wird bei aktivierten ContactCalls die entsprechende Funktion im Script des Objekts aufgerufen, sobald der Vertex mit der Landschaft kollidiert, so dass das Objekt merkt, dass es z.B. links gegen eine Wand gefahren ist und entsprechend reagieren kann. Bei Objekten mit SolidMask ist zu beachten, dass jeder Vertex mindestens einen Punkt Abstand zum festen Bereich hat, sonst bleibt das Objekt in der eigenen SolidMask hängen."
@ -15422,7 +15365,7 @@ msgstr "Die Engine ruft zu Zeiten die folgenden Funktionen in Objektscripten auf
#: sdk/definition/properties.xml:9(text)
msgid "Every object has a number of properties that are handled by the engine. Typically, these are inherited from the object's Prototype, an <emlink href=\"definition/index.html#Objektdefinitionen\">Object Definition</emlink>. A Property of an Object Definition is defined with the <code>local</code> keyword in the <emlink href=\"definition/script.html#Objektscripte\">Definition's script</emlink>:"
msgstr ""
msgstr "Jedes Objekt besitzt Properties die von der engine interpretiert werden. Normalerweise werden diese vom Prototyp des objekts abgeleitet, seiner <emlink href=\"definition/index.html#Objektdefinitionen\">Objektdefinition</emlink>. Eine Property einer Objektdefinition wird mit dem <code>local</code>-Schlüsselwort im <emlink href=\"definition/script.html#Objektscripte\">Definitionsscript</emlink> definiert."
#: sdk/definition/properties.xml:30(col)
#: sdk/definition/properties.xml:50(col)
@ -15434,6 +15377,14 @@ msgstr "proplist"
msgid "string"
msgstr "string"
#: sdk/definition/properties.xml:55(col)
msgid "int/array"
msgstr "int/array"
#: sdk/definition/properties.xml:56(col)
msgid "Controls the visibility of the object. See the <emlink href=\"definition/visibility.html\">detailed documentation of possible values</emlink>."
msgstr "Steuert die Sichtbarkeit des Objekts. <emlink href=\"./visibility.xml\">Detailierte Dokumentation möglicher Werte</emlink>"
#: sdk/definition/properties.xml:105(col)
#: sdk/definition/properties.xml:110(col)
#: sdk/definition/properties.xml:115(col)
@ -17038,6 +16989,15 @@ msgstr "c4group.exe (Windows) c4group (Linux) c4group (Mac)"
msgid "This command line program is used for processing group files. A list of command line options is available by starting the program without parameters via command line (<i>not</i> by double clicking)."
msgstr "Dieses Kommandozeilen-Programm dient zum Bearbeiten von Gruppendateien. Es kann nicht per Doppelklick, sondern nur per Kommandozeile (Eingabeaufforderung) gestartet werden. Auskunft über alle verfügbaren Kommandozeilenparameter erhält man, indem man das Programm ohne weitere Parameter über die Kommandozeile startet."
#~ msgid "The object will only be visible for it's owner and the spectators."
#~ msgstr "Das Objekt wird nur für seinen Besitzer und Zuschauer sichtbar."
#~ msgid "Visible for player 0 and 3"
#~ msgstr "Sichtbar für Spieler 0 und 3"
#~ msgid "This is also possible (as long as it is not done for a layer)"
#~ msgstr "Auch dies ist möglich (Aber nicht in einem Layer)"
#~ msgid "Developer Mode <placeholder-1/>"
#~ msgstr "Entwicklermodus <placeholder-1/>"

View File

@ -52,8 +52,8 @@ Stand = {
</row>
<row>
<col><code>Visibility</code></col>
<col></col>
<col></col>
<col>int/array</col>
<col>Controls the visibility of the object. See the <emlink href="definition/visibility.html">detailed documentation of possible values</emlink>.</col>
</row>
<row>
<col><code>LineColors</code></col>

View File

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE doc
SYSTEM '../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../clonk.xsl"?>
<doc>
<title>Visibility</title>
<h id="Visibility">Visibility</h>
<part>
<text>Every object has a <emlink href="definition/properties.html">property</emlink>, which controls its visibility for players. It may be either <funclink>VIS_All</funclink> or <funclink>VIS_None</funclink> or a bit mask of <funclink>VIS_Owner</funclink>, <funclink>VIS_Allies</funclink>, <funclink>VIS_Enemies</funclink> and <funclink>VIS_God</funclink>, or an array starting with <funclink>VIS_Select</funclink> followed by bools setting the visibility for each player. If the object has a layer, it will only be visible if the layer is visible, unless <funclink>VIS_LayerToggle</funclink> is set for the layer.</text>
<code>this.Visibility = <funclink>VIS_God</funclink> | <funclink>VIS_Owner</funclink> // The object will only be visible for it's owner and the spectators.
this.Visibility = [<funclink>VIS_Select</funclink>, 1, 0, 0, 1]; // Visible for player 0 and 3
this.Visibility = [<funclink>VIS_Enemies</funclink>]; // This is also possible (as long as it is not done for a layer)
</code>
<text>
<table>
<caption id="VISTable">VIS_-Constants</caption>
<rowh>
<col>Name</col>
<col>Description</col>
</rowh>
<row id="VIS_All">
<col><code>VIS_All</code></col>
<col>Visible for anyone</col>
</row>
<row id="VIS_None">
<col><code>VIS_None</code></col>
<col>Visible for noone</col>
</row>
<row id="VIS_Owner">
<col><code>VIS_Owner</code></col>
<col>Visible for the owner</col>
</row>
<row id="VIS_Allies">
<col><code>VIS_Allies</code></col>
<col>Visible for the owners allies (not for the owner)</col>
</row>
<row id="VIS_Enemies">
<col><code>VIS_Enemies</code></col>
<col>Visible for any player hostile to the owner</col>
</row>
<row id="VIS_Select">
<col><code>VIS_Select</code></col>
<col>Is ignored when the property is not an array. If set, the object is visible if the element at position (playernumber+1) is true. Try and avoid using it, you will have to update it on hostility changes and player joins.</col>
</row>
<row id="VIS_God">
<col><code>VIS_God</code></col>
<col>Visible for spectators and in playerless editor windows</col>
</row>
<row id="VIS_LayerToggle">
<col><code>VIS_LayerToggle</code></col>
<col>For layers. Make the layer's objects visible when their layer is invisible and vice versa.</col>
</row>
<row id="VIS_OverlayOnly">
<col><code>VIS_OverlayOnly</code></col>
<col>Only overlays will be visible, other visibility-rules still apply.</col>
</row>
</table>
</text>
<related>
<funclink>CheckVisibility</funclink>
</related>
</part>
<author>Caesar</author><date>2011</date>
</doc>

View File

@ -23,11 +23,11 @@ func Activate(object caster, object caster2)
if (caster2) caster = caster2; target = caster;
// save previous visibility and color modulation of the caster
old_visibility = caster-&gt;<funclink>GetVisibility</funclink>();
old_visibility = caster.Visibility;
old_modulation = caster-&gt;<funclink>GetClrModulation</funclink>();
// make caster only visible to himself and allies, color him like a ghost
caster-&gt;<funclink>SetVisibility</funclink>(<funclink>VIS_Owner</funclink> | <funclink>VIS_Allies</funclink> | <funclink>VIS_God</funclink>);
caster.Visibility = <funclink>VIS_Owner</funclink> | <funclink>VIS_Allies</funclink> | <funclink>VIS_God</funclink>;
caster-&gt;<funclink>SetClrModulation</funclink>(<funclink>ModulateColor</funclink>(old_modulation, <funclink>RGBa</funclink>(127,127,255,127)));
// start timer: 30 seconds invisible
@ -46,7 +46,7 @@ func Destruction()
{
// spell is being removed: end invisibility
target-&gt;<funclink>SetClrModulation</funclink>(old_modulation);
target-&gt;<funclink>SetVisibility</funclink>(old_visibility);
target.Visibility = old_visibility;
}</code>
<text>The magic spell object exists until the spell has ended and then makes the clonk visible again. Also, if the spell object is deleted for other reasons (e.g. a scenario section change), the clonk is made visible in the Destruction callback (if this wasn't so, the clonk would remain invisible for ever). Also there is a Timer (defined in the DefCore) called every second. Notice you couldn't just have a single timer call to mark the end of the spell because timer intervals are marked in the engine beginning with the start of the round and you wouldn't know at what point within an engine timer interval the spell would start.</text>
<text>However, there are some problems with this implementation: for example, the magician can not cast a second invisibility spell while he's already invisible - the second spell would have practically no effect, because the end of the first spell would make the clonk visible again. The spell script would have to do some special handling for this case - but not only for multiple invisibility spells, but also for any other spell or script that might affect visibility or coloration of the clonk. Even if this spell would remember the previous value e.g. for coloration it could not handle a situation in which other scripts change the color of their own in the middle of the spell. The same problems occur when multiple scripts modify temporary clonk physcials such as jumping, walking speed, fight strength or visibility range, energy, magic energy etc. Using effects, these conflicts can be avoided.</text>
@ -72,10 +72,10 @@ func Activate(object caster, object caster2)
func FxInvisPSpellStart(object target, proplist effect)
{
// Vorherige Sichtbarkeit des Zauberers speichern
effect.visibility = target-&gt;<funclink>GetVisibility</funclink>();
effect.visibility = target.Visibility;
effect.old_mod = target-&gt;<funclink>GetClrModulation</funclink>();
// Zauberer unsichtbar machen
target-&gt;<funclink>SetVisibility</funclink>(<funclink>VIS_Owner</funclink> | <funclink>VIS_Allies</funclink> | <funclink>VIS_God</funclink>);
target.Visibility = <funclink>VIS_Owner</funclink> | <funclink>VIS_Allies</funclink> | <funclink>VIS_God</funclink>;
// Halbdurchsichtig bläulich für den Besitzer und Verbündete
target-&gt;SetClrModulation(<funclink>ModulateColor</funclink>(effect.old_mod, RGBa(127,127,255,127)));
// Fertig
@ -86,7 +86,7 @@ func FxInvisPSpellStop(object target, proplist effect)
{
// restore previous values
target-&gt;<funclink>SetClrModulation</funclink>(effect.old_mod);
target-&gt;<funclink>SetVisibility</funclink>(effect.visibility);
target.Visibility = effect.visibility;
// done
return true;
}</code>

View File

@ -21,8 +21,7 @@
</syntax>
<desc>Checks whether this object is visible for the given player.</desc>
<related>
<funclink>SetVisibility</funclink>
<funclink>GetVisibility</funclink>
<emlink href="definition/visibility.html">Visibility</emlink>-Property
</related>
</func>
<author>Newton</author><date>2009-07</date>

View File

@ -1,43 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<func>
<title>CheckVisibility</title>
<category>Objects</category>
<subcat>Visibility</subcat>
<version>5.1 OC</version>
<syntax>
<rtype>bool</rtype>
<params>
<param>
<type>int</type>
<name>player</name>
<desc>Player of which to retrieve the visibility. Can be 0 in local calls.</desc>
<optional />
</param>
</params>
</syntax>
<desc>Returns the current visibility of an object. Also see <funclink>SetVisibility</funclink>.</desc>
<examples>
<example>
<code>var vis=<funclink>GetVisibility</funclink>();
if (vis &amp;&amp; ~vis &amp; <funclink>VIS_Owner</funclink>()) <funclink>SetVisibility</funclink>(vis | <funclink>VIS_Owner</funclink>());</code>
<text>If the calling object is not visible for its owner, it will be made so.</text>
</example>
</examples>
<related>
<funclink>SetVisibility</funclink>
<funclink>CheckVisibility</funclink>
<funclink>VIS_All</funclink>
<funclink>VIS_None</funclink>
<funclink>VIS_Owner</funclink>
<funclink>VIS_Allies</funclink>
<funclink>VIS_Enemies</funclink>
<funclink>VIS_God</funclink>
<funclink>VIS_Local</funclink>
</related>
</func>
<author>Sven2</author><date>2001-11</date>
</funcs>

View File

@ -1,45 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<func>
<title>SetVisibility</title>
<category>Objects</category>
<subcat>Visibility</subcat>
<version>5.1 OC</version>
<syntax>
<rtype>bool</rtype>
<params>
<param>
<type>int</type>
<name>dwVisibility</name>
<desc>Bit mask defining the new visibility.<br/> Either <funclink>VIS_All</funclink> or <funclink>VIS_None</funclink> or a bit mask of <funclink>VIS_Owner</funclink>, <funclink>VIS_Allies</funclink>, <funclink>VIS_Enemies</funclink>, <funclink>VIS_God</funclink>, and <funclink>VIS_Local</funclink>.</desc>
</param>
</params>
</syntax>
<desc>Changes the visibility of an object. Objects can be made invisible for any group of players by providing a bit mask in dwVisibility.</desc>
<examples>
<example>
<code>SetVisibility(<funclink>VIS_None</funclink>(), <funclink>GetCursor</funclink>())</code>
<text>Makes the selected clonk of player 0 completely invisible.</text>
</example>
<example>
<code>SetVisibility(<funclink>VIS_Owner</funclink>() | <funclink>VIS_Allies</funclink>(), <funclink>GetCursor</funclink>())</code>
<text>Makes the selected clonk of player 0 only visible for his owner and allies.</text>
</example>
</examples>
<related>
<funclink>GetVisibility</funclink>
<funclink>CheckVisibility</funclink>
<funclink>VIS_All</funclink>
<funclink>VIS_None</funclink>
<funclink>VIS_Owner</funclink>
<funclink>VIS_Allies</funclink>
<funclink>VIS_Enemies</funclink>
<funclink>VIS_God</funclink>
<funclink>VIS_Local</funclink>
</related>
</func>
<author>Sven2</author><date>2001-11</date>
</funcs>

View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<const>
<title>VIS_All</title>
<category>Objects</category>
<subcat>Visibility</subcat>
<version>5.1 OC</version>
<syntax><rtype>int</rtype></syntax>
<desc>Constant for <funclink>GetVisibility</funclink>/<funclink>SetVisibility</funclink>. The object is visible for all. This is the default value 0 and kann logically not be combined with other VIS_x values.</desc>
<examples>
<example>
<code>for(var obj in FindObjects()) SetVisibility(VIS_All, obj);</code>
<text>Makes all objects visible.</text>
</example>
</examples>
<related>
<funclink>GetVisibility</funclink>
<funclink>SetVisibility</funclink>
<funclink>VIS_None</funclink>
<funclink>VIS_Owner</funclink>
<funclink>VIS_Allies</funclink>
<funclink>VIS_Enemies</funclink>
<funclink>VIS_God</funclink>
<funclink>VIS_Local</funclink>
</related>
</const>
<author>Sven2</author><date>2001-11</date>
</funcs>

View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<const>
<title>VIS_Allies</title>
<category>Objects</category>
<subcat>Visibility</subcat>
<version>5.1 OC</version>
<syntax><rtype>int</rtype></syntax>
<desc>Constant for <funclink>GetVisibility</funclink>/<funclink>SetVisibility</funclink>. The object is visible for all allies of the owner.</desc>
<examples>
<example>
<code>for(var obj in FindObjects(Find_OCF(<funclink>OCF_CrewMember</funclink>))) SetVisibility(VIS_Owner | VIS_Allies, obj);</code>
<text>Makes all selected clonks visible to their owners or their allies only.</text>
</example>
</examples>
<related>
<funclink>GetVisibility</funclink>
<funclink>SetVisibility</funclink>
<funclink>VIS_All</funclink>
<funclink>VIS_None</funclink>
<funclink>VIS_Owner</funclink>
<funclink>VIS_Enemies</funclink>
<funclink>VIS_God</funclink>
<funclink>VIS_Local</funclink>
</related>
</const>
<author>Sven2</author><date>2001-11</date>
</funcs>

View File

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<const>
<title>VIS_Enemies</title>
<category>Objects</category>
<subcat>Visibility</subcat>
<version>5.1 OC</version>
<syntax><rtype>int</rtype></syntax>
<desc>Constant for <funclink>GetVisibility</funclink>/<funclink>SetVisibility</funclink>. The object is visible for all enemires of the owner.</desc>
<examples>
<example>
<code>for(var obj in FindObjects(Find_ID(Flagpole))) SetVisibility(VIS_Enemies | VIS_God, obj);
</code>
<text>All banners are only visible for the individual enemies of their owners.</text>
</example>
</examples>
<related>
<funclink>GetVisibility</funclink>
<funclink>SetVisibility</funclink>
<funclink>VIS_All</funclink>
<funclink>VIS_None</funclink>
<funclink>VIS_Owner</funclink>
<funclink>VIS_Allies</funclink>
<funclink>VIS_God</funclink>
<funclink>VIS_Local</funclink>
</related>
</const>
<author>Sven2</author><date>2001-11</date>
</funcs>

View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<const>
<title>VIS_God</title>
<category>Objects</category>
<subcat>Visibility</subcat>
<version>5.1 OC</version>
<syntax><rtype>int</rtype></syntax>
<desc>Constant for <funclink>GetVisibility</funclink>/<funclink>SetVisibility</funclink>. The object is only visible in general viewports (editor or observer viewports).</desc>
<examples>
<example>
<code>SetVisibility(VIS_God, FindObject(Find_ID(Chest)));</code>
<text>A chest is now only visible in general viewports.</text>
</example>
</examples>
<related>
<funclink>GetVisibility</funclink>
<funclink>SetVisibility</funclink>
<funclink>VIS_All</funclink>
<funclink>VIS_None</funclink>
<funclink>VIS_Owner</funclink>
<funclink>VIS_Allies</funclink>
<funclink>VIS_Enemies</funclink>
<funclink>VIS_Local</funclink>
</related>
</const>
<author>Sven2</author><date>2001-11</date>
</funcs>

View File

@ -1,39 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<const>
<title>VIS_Local</title>
<category>Objects</category>
<subcat>Visibility</subcat>
<version>5.1 OC</version>
<syntax><rtype>int</rtype></syntax>
<desc>Constant for <funclink>GetVisibility</funclink>/<funclink>SetVisibility</funclink>. The object's visibility depends on the values in the object's indexed local variables. Each local variable may contain bits for 32 players in a bit mask.</desc>
<examples>
<example>
<code><funclink>Local</funclink>(0)=9; SetVisibility(VIS_Local());</code>
<text>The calling object is only visible for players 0 and 3.</text>
</example>
<example>
<code><funclink>Local</funclink>(1)=2; SetVisibility(VIS_Local() | VIS_God());</code>
<text>The calling object is only visible for player 33.</text>
</example>
<example>
<code><funclink>Local</funclink>(<funclink>GetOwner</funclink>()/32)=1&lt;&lt;(<funclink>GetOwner</funclink>()%32); SetVisibility(VIS_Local());</code>
<text>The calling object will be visible to its owner only (same as <funclink>VIS_Owner</funclink>).</text>
</example>
</examples>
<related>
<funclink>GetVisibility</funclink>
<funclink>SetVisibility</funclink>
<funclink>VIS_All</funclink>
<funclink>VIS_None</funclink>
<funclink>VIS_Owner</funclink>
<funclink>VIS_Allies</funclink>
<funclink>VIS_Enemies</funclink>
<funclink>VIS_God</funclink>
</related>
</const>
<author>Sven2</author><date>2001-11</date>
</funcs>

View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<const>
<title>VIS_None</title>
<category>Objects</category>
<subcat>Visibility</subcat>
<version>5.1 OC</version>
<syntax><rtype>int</rtype></syntax>
<desc>Constant for <funclink>GetVisibility</funclink>/<funclink>SetVisibility</funclink>. The object is not visible for anybody.</desc>
<examples>
<example>
<code>for(var obj in FindObjects(Find_ID(Wipf))) SetVisibility(VIS_None, obj);</code>
<text>Makes all wipfs invisible.</text>
</example>
</examples>
<related>
<funclink>GetVisibility</funclink>
<funclink>SetVisibility</funclink>
<funclink>VIS_All</funclink>
<funclink>VIS_Owner</funclink>
<funclink>VIS_Allies</funclink>
<funclink>VIS_Enemies</funclink>
<funclink>VIS_God</funclink>
<funclink>VIS_Local</funclink>
</related>
</const>
<author>Sven2</author><date>2001-11</date>
</funcs>

View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<const>
<title>VIS_Owner</title>
<category>Objects</category>
<subcat>Visibility</subcat>
<version>5.1 OC</version>
<syntax><rtype>int</rtype></syntax>
<desc>Constant for <funclink>GetVisibility</funclink>/<funclink>SetVisibility</funclink>. The object is visible for its owner.</desc>
<examples>
<example>
<code>for(var obj in FindObjects(Find_OCF(<funclink>OCF_CrewMember</funclink>))) SetVisibility(VIS_Owner, obj);</code>
<text>Makes all clonks that are in a crew visible for their owners only.</text>
</example>
</examples>
<related>
<funclink>GetVisibility</funclink>
<funclink>SetVisibility</funclink>
<funclink>VIS_All</funclink>
<funclink>VIS_None</funclink>
<funclink>VIS_Allies</funclink>
<funclink>VIS_Enemies</funclink>
<funclink>VIS_God</funclink>
<funclink>VIS_Local</funclink>
</related>
</const>
<author>Sven2</author><date>2001-11</date>
</funcs>

View File

@ -1137,7 +1137,7 @@ void C4Object::AssignDeath(bool fForced)
if(!pPlr->Crew.ObjectCount())
::GameScript.GRBroadcast(PSF_RelaunchPlayer,
&C4AulParSet(C4VInt(Owner),C4VInt(iDeathCausingPlayer)));
}
bool C4Object::ChangeDef(C4ID idNew)
@ -1902,7 +1902,7 @@ bool C4Object::SetPhase(int32_t iPhase)
void C4Object::Draw(C4TargetFacet &cgo, int32_t iByPlayer, DrawMode eDrawMode, float offX, float offY)
{
C4Facet ccgo;
// Status
if (!Status || !Def) return;
@ -4230,12 +4230,6 @@ bool C4Object::IsVisible(int32_t iForPlr, bool fAsOverlay)
{
Visibility = vis.getInt();
}
// check overlay
if (Visibility & VIS_OverlayOnly)
{
if (!fAsOverlay) return false;
if (Visibility == VIS_OverlayOnly) return true;
}
// check layer
if (Layer && Layer != this && !fAsOverlay)
{
@ -4245,6 +4239,12 @@ bool C4Object::IsVisible(int32_t iForPlr, bool fAsOverlay)
}
// no flags set?
if (!Visibility) return true;
// check overlay
if (Visibility & VIS_OverlayOnly)
{
if (!fAsOverlay) return false;
if (Visibility == VIS_OverlayOnly) return true;
}
// check visibility
fDraw=false;
if (Visibility & VIS_Owner) fDraw = fDraw || (iForPlr==Owner);