2DWorlds Forums
2/22/11 - Printable Version

+- 2DWorlds Forums (http://2dworlds.buildism.net/forum)
+-- Forum: 2DWorlds (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=4)
+--- Forum: News (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=8)
+--- Thread: 2/22/11 (/showthread.php?tid=1336)



2/22/11 - Jacob__mybb_import1 - 02-22-2011

  • Scripts inside tools no longer run unless the tool is owned by a player
  • Fixed a bug where old script threads wouldn't go away after the script finished
  • Added some new functions and properties for Vec2Ds

[lua]
vec2D.length
vec2D.normalized --returns a unit vector (divide by the length)
vec2D:add(vec2D)
vec2DConfusedub(vec2D)
vec2D:mul(vec2D) --multiply
vec2D:mul(number)
vec2D:div(vec2D) --divide
vec2D:div(number)
[/lua]

These functions return a copy, they do not change the original. For example, here is how to find the distance between two parts.

[lua]distance = part2.PositionConfusedub(part1.Position).length[/lua]


RE: 2/22/11 - Qwertygiy - 02-23-2011

I think the tool update broke some of them. Break In the House's rocket won't go.


RE: 2/22/11 - Jacob__mybb_import1 - 02-23-2011

(02-23-2011, 01:32 AM)Qwertygiy Wrote: I think the tool update broke some of them. Break In the House's rocket won't go.

That's been broken since I tweaked the save format a while ago. Are any other games broken?


RE: 2/22/11 - Qwertygiy - 02-23-2011

(02-23-2011, 03:13 AM)Jacob_ Wrote: Are any other games broken?

My Reset Tool still works fine. Other than that, not sure.