there is still a problem with reading Fields (it can return 0 / write an error to the console / return the normal value), there is also a problem with set Field (on screen shows the console with the angle)
I just wanted to write a simple MapEdit =(
// it's just an attempt to rewrite code with MW2 def createRamp(top, bottom) { var distance = gsc.distance(top, bottom); var blocks = (int)(distance / 30) + 1; var A = [(top[0] - bottom[0]) / blocks, (top[1] - bottom[1]) / blocks, (top[2] - bottom[2]) / blocks]; var temp = gsc.vectorToAngles([top[0] - bottom[0], top[1] - bottom[1], top[2] - bottom[2]]); var BA = [temp[2], temp[1] + 90, temp[0]]; for (var b = 0; b <= blocks; ++b) { print(BA); var crate = gsc.spawn("script_model", [bottom[0] + A[0] * b, bottom[1] + A[1] * b, bottom[2] + A[2] * b]); crate.set("angles", BA); //crate.set("angles", BA); crate.setModel("com_plasticcase_trap_friendly"); } }image.png