Search

Search found 14 matches

by Tanatos
30 Aug 2011, 16:02
Forum: Lua Scripts
Topic: Spring.Pos2BuildPos - BUG ?
Replies: 11
Views: 2324

Re: Spring.Pos2BuildPos - BUG ?

Written by an alternative function for alignments. Paste code in LUA and instead use Spring.Pos2BuildPos function Pos2BuildPos(DefID, x, y, z, h) -- Grid step local Step = 16 -- 1/2 size of Building local ud = UnitDefs[DefID] local baseX = ud.xsize * 4 local baseZ = ud.zsize * 4 if (h == 1 or h==3) ...
by Tanatos
30 Aug 2011, 13:58
Forum: Lua Scripts
Topic: Spring.Pos2BuildPos - BUG ?
Replies: 11
Views: 2324

Re: Spring.Pos2BuildPos - BUG ?

Thanks again!!!
Checked, it works, only added orientation.

When can we expect that the fix will appear in the release version?
I would like to use the code in the real world, and the server needs to replace the version of the exe-file
by Tanatos
30 Aug 2011, 11:37
Forum: Lua Scripts
Topic: Spring.Pos2BuildPos - BUG ?
Replies: 11
Views: 2324

Re: Spring.Pos2BuildPos - BUG ?

Google_Frog thanks for the example, but this widget gets the coordinates already building under construction. This means that the alignment of the grid is not happening. Widget Central Build also receives the coordinates of the real line for construction. Just wanted to know how to fix the code:) In...
by Tanatos
30 Aug 2011, 00:03
Forum: Lua Scripts
Topic: Spring.Pos2BuildPos - BUG ?
Replies: 11
Views: 2324

Re: Spring.Pos2BuildPos - BUG ?

Left buildig place with Central Build.
Right i draw, no cheat
by Tanatos
29 Aug 2011, 23:41
Forum: Lua Scripts
Topic: Spring.Pos2BuildPos - BUG ?
Replies: 11
Views: 2324

Re: Spring.Pos2BuildPos - BUG ?

The error occurs only on the building of Fusion Reactor
Mod: Zero-K
by Tanatos
29 Aug 2011, 23:28
Forum: Lua Scripts
Topic: Spring.Pos2BuildPos - BUG ?
Replies: 11
Views: 2324

Spring.Pos2BuildPos - BUG ?

Draw a box around the building model in the mouse coordinates. Draw a model of a building aligned coordinate function Pos2BuildPos. The result is visible in the screenshot. On the left shows the structure in line for construction - to 100% correct. Alignment gives wrong coordinates? Why? The code is...
by Tanatos
18 Aug 2011, 13:17
Forum: Lua Scripts
Topic: Display Unit as build command
Replies: 14
Views: 1657

Re: Display Unit as build command

Thank you very much for your answers! Special thanks for "maxSlope of the unitDef", sure it is key information for solving the problem. I do not have a specific goal. Programming, a hobby of mine. Now I'm curious to deal with Lua scripts in the Spring. Learn what is already written. In the...
by Tanatos
18 Aug 2011, 01:00
Forum: Lua Scripts
Topic: Display Unit as build command
Replies: 14
Views: 1657

Re: Display Unit as build command

knorke, thank you very much for your patience and responsiveness! 1) not interested 2) not interested 3) not interested 4) terrain is too steep -> possible to read terrain slope, too How? 5) not interested I decided to do without until the detail - it is difficult and the result is not worth it. If ...
by Tanatos
18 Aug 2011, 00:25
Forum: Lua Scripts
Topic: Display Unit as build command
Replies: 14
Views: 1657

Re: Display Unit as build command

already use and Spring.TestBuildOrder Spring.Pos2BuildPos, see post number 4.
Thanks anyway!
by Tanatos
17 Aug 2011, 23:27
Forum: Lua Scripts
Topic: Display Unit as build command
Replies: 14
Views: 1657

Re: Display Unit as build command

this function "ClosestBuildSite" not accesible from Lua Widget?
Where can I find a complete list of features available in LUA?
Here "http://springrts.com/wiki/Lua_Scripting" does not list all the functions :( ... For example there is no "Pos2BuildPos"
by Tanatos
17 Aug 2011, 23:23
Forum: Lua Scripts
Topic: Display Unit as build command
Replies: 14
Views: 1657

Re: Display Unit as build command

I have no problem with how to draw.
Problems with the lack of data! How to get the details about what a square is not available for place building?
by Tanatos
17 Aug 2011, 22:46
Forum: Lua Scripts
Topic: Display Unit as build command
Replies: 14
Views: 1657

Re: Display Unit as build command

Partly found the answer! -- get the coordinates of gridded local bx, by, bz = Spring.Pos2BuildPos (UnitDefID, x, y, z) -- check the availability of construction local CheckResult = Spring.TestBuildOrder (UnitDefID, bx, by, bz, h) I am looking for how to display the grid and get more detailed informa...
by Tanatos
17 Aug 2011, 22:00
Forum: Lua Scripts
Topic: Display Unit as build command
Replies: 14
Views: 1657

Re: Display Unit as build command

Thank you for your help! Unfortunately I have not found answers to their questions. In the subject being discussed tech tree, but I'm only interested in place to build. I need to display identical image, but so that I could manage it himself. Maybe I did not understand your example? If so tell me wh...
by Tanatos
17 Aug 2011, 21:04
Forum: Lua Scripts
Topic: Display Unit as build command
Replies: 14
Views: 1657

Display Unit as build command

Two units to be displayed as when you choose "build". Example of the picture. needed: - Simultaneously display two units - Display the grid - Align to grid - Display the availability of construction for each cell Looking for code samples, commands, lua, widgets or other assistance ...Pleas...

Go to advanced search