New engine features |
Top Previous Next |
Terrain resolution
The resolution of the terrain can be changed in Med.
level_mark() and level_free()
These two functions mark a cache position (level_mark) and free the nexus by all the entities that were loaded afterwards (level_free). Please don't mess with them unless you really know what you are doing!
string player_mdl = <player.mdl>; string enemy1_mdl = <enemy1.mdl>; string enemy2_mdl = <enemy2.mdl>; string enemy3_mdl = <enemy3.mdl>; string enemy4_mdl = <enemy4.mdl>;
entity* enemy1; entity* enemy2; entity* enemy3; entity* enemy4;
starter test_markers() { sleep (1); ent_create (player_mdl, vector(100, 0, 0), null); enemy1 = ent_create (enemy1_mdl, vector(200, 0, 0), null); level_mark(); // mark the current cache position enemy2 = ent_create (enemy2_mdl, vector(300, 0, 0), null); enemy3 = ent_create (enemy3_mdl, vector(400, 0, 0), null); enemy4 = ent_create (enemy4_mdl, vector(500, 0, 0), null); while (key_space == 0) {wait (1);} // press "space" to remove some of the enemies and clear the cache ent_remove(enemy2); // remove enemy2 ent_remove(enemy3); // remove enemy3 ent_remove(enemy4); // remove enemy4 level_free(); // and now clear the nexus from ALL the things that were loaded after level_mark() }
shadow_lod
Sets the lod model from which the dynamic shadow will be created; this way you can have shadows that show less detail than the original model.
|