|
Neue Engine Features |
Top Previous Next |
|
vec_for_ent (position, entity)
Dieser Befehl wandelt den gegebenen Positionsvektor aus dem lokalen Koordinatensystem der Entitiy in Weltkoordinaten um.
function move_halo() { while(you) { vec_set(my.pan, your.pan); vec_set(my.x, vector(0, 0, 80)); // the halo floats 80 quants above its creator's origin vec_for_ent(my.x, you); // convert this position to world coordinates wait(1); } ent_remove(my); // the creator has been removed here, so remove the halo as well }
action moving_entity() { ent_create("halo.tga", nullvector, move_halo); while (1) { my.x += 1 - random(2); // plain random movement (no collision detection!) my.y += 1 - random(2); wait (1); } }
ent_type (entity)
liefert den Typ der Entity bzw. des aktuellen Levels zurück, falls NULL übergeben wird.
0 – kein gültiger Typ 1 – Polygonbasierte BSP Map (A4, A5, A6) 2 – Mesh-basierte ABT Map (A7) 3 – Mesh-basierte BSP Map (A7) 4 – Terrain 5 – Model 6 – Sprite
var entity_type;
BMAP* arrow_pcx = "arrow.pcx";
function mouse_startup() { // allow the player to touch the entities even if they are 5,000 quants away from the camera mouse_range = 5000; mouse_mode = 1; mouse_map = arrow_pcx; while (1) { vec_set(mouse_pos, mouse_cursor); wait(1); } }
function type_startup() { while (1) { entity_type = ent_type(mouse_ent); wait (1); } }
PANEL* test_pan = { digits(160, 180, 4, *, 1, entity_type); flags = visible; }
Verbesserungen des Map Compilers
Der Map Compiler unterstützt jetzt ein smooth Flag für Lighting 2.0
|