Kategorie: Objekte
/ Erzeugung
Ab Engineversion: 6.0 OC
CreateObjectAbove
Beschreibung
Creates an object of the specified type at the specified position. The position will be the bottom center of the new object. xoffset and yoffset are relative to the calling object in local calls, otherwise global.
Syntax
object CreateObjectAbove(id id, int xoffset, int yoffset, int owner);
Parameter
- id:
- Typ des zu erstellenden Objekts
- xoffset:
- X-Koordinate
- yoffset:
- Y-Koordinate
- owner:
- [opt] Besitzer des zu erstellenden Objekts. Entweder der Index eines Spielers oder
NO_OWNERfür keinen Besitzer. Wenn nicht angegeben wird der Besitzer des neuen Objektes auf den Controller des aufrufenden Objektes gesetzt bzw.NO_OWNERwenn CreateObject ohne Objektkontext aufgerufen wird.
Beispiel
CreateObject(Wipf, 100,100, NO_OWNER);
Creates a wipf at coordinates 100/100 with no owner. If the landscape begins at y-coordinate 100, then the wipf will be stuck.
CreateObjectAbove(Wipf, 150,100, NO_OWNER);
Creates a wipf above coordinates 100/100 with no owner. This time the wipf should be standing on the landscape.


