mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-12-01 16:12:33 +00:00
192ddc9e6c
- Add two new example scripts, remove one useless example script
17 lines
430 B
JavaScript
17 lines
430 B
JavaScript
/// <reference path="../udbscript.d.ts" />
|
|
|
|
`#version 5`;
|
|
|
|
`#name Convert thing height to absolute Z`;
|
|
|
|
|
|
UDB.Map.getSelectedOrHighlightedThings().forEach(thing => {
|
|
const sector = thing.getSector();
|
|
if (thing.flags['absolutez'] == false && sector != null) {
|
|
let plane = sector.getFloorPlane();
|
|
let z = plane.getZ([thing.position.x, thing.position.y]);
|
|
|
|
thing.position.z += z;
|
|
thing.flags['absolutez'] = true;
|
|
}
|
|
});
|