Search

Search found 456 matches

by Niobium
13 Jul 2009, 18:06
Forum: Lua Scripts
Topic: unit_auto_com_group.lua
Replies: 23
Views: 1078

Re: unit_auto_com_group.lua

manolo_ wrote:couldnt it just detect the unit that is at the startpoint? and could it autpgroup if upgrade my boi?
Spring.GetTeamStartPosition(teamID) -> x, y, z
Spring.GetUnitsInCylinder(x, y, z, r, [teamID]) -> unit table

For upgrade, detect issued morph command and monitor?
by Niobium
13 Jul 2009, 06:14
Forum: Balanced Annihilation
Topic: buff peewee
Replies: 26
Views: 2124

Re: buff peewee

Noruas wrote:Their arms take too long to raise, look at xta zombie peewees to fix the problem.
+1, worst thing about the peewee compared to ak, that they have to raise arms, at which point they are dead
by Niobium
12 Jul 2009, 14:14
Forum: Lua Scripts
Topic: Central Build AI as lua widget!
Replies: 80
Views: 10340

Re: Central Build AI as lua widget!

Kloot's right of course. And here's an example of where it would stop calling it for widgets after one handles: function widgetHandler:CommandNotify(id, params, options) for _,w in ipairs(self.CommandNotifyList) do if (w:CommandNotify(id, params, options)) then return true end end return false end
by Niobium
12 Jul 2009, 11:44
Forum: Lua Scripts
Topic: Central Build AI as lua widget!
Replies: 80
Views: 10340

Re: Central Build AI as lua widget!

A thought just wandered through my mind: are widgets affected by each other? Suppose I have multiple widgets with 'function widget:UnitDestroyed()' in them. When a unit is destroyed, are all the functions in all the widgets triggered, or is the first it finds triggered and then the Lua engine consi...
by Niobium
11 Jul 2009, 14:29
Forum: Lua Scripts
Topic: Metal reclaim widget
Replies: 12
Views: 585

Re: Metal reclaim widget

No, Aegis's widget is fuxored. Sometimes it will take the longest routes possible to reclaim. It depends, do you want to go closest to closest (Fast algorithm, easy to code, but can result in 'bad' last few) or shortest overall (Hard algorithm, traveling salesperson, etc), a lot of the time it depe...
by Niobium
11 Jul 2009, 06:08
Forum: Lua Scripts
Topic: Central Build AI as lua widget!
Replies: 80
Views: 10340

Re: Central Build AI as lua widget!

The grumbling is because I had hoped to avoid pretty much all the above checks by using GroupChanged() --> "groupID" where groupID is the value of Group whose table value changed. A unit in the group getting destroyed, captured, or given away is a change, right? All that's taken care of t...
by Niobium
11 Jul 2009, 06:02
Forum: Lua Scripts
Topic: Custom Formations 2
Replies: 112
Views: 10421

Re: Custom Formations 2

I'm sorry, can I get the link for the version of Custom Formations 2 which works with the final version of Spring? At the moment the only thing I can get my hands on is Custom Formations 1 working, Custom Formations 1 not working and Custom Formations 2 not working. There's links to the dead versio...
by Niobium
10 Jul 2009, 15:29
Forum: Lua Scripts
Topic: Central Build AI as lua widget!
Replies: 80
Views: 10340

Re: Central Build AI as lua widget!

Not so sure about the centralized build queue. What could I use as a unique key for each entry? Yeah, for the queue you are best to just use an array, tremove/tinsert etc. Almost everything that uses unit IDs is better to use unit ID as the key. Small code is so nice. Maybe you know this alreya, an...
by Niobium
10 Jul 2009, 07:55
Forum: Lua Scripts
Topic: Central Build AI as lua widget!
Replies: 80
Views: 10340

Re: Central Build AI as lua widget!

Looking at the code, I would recommend switching the way you do all your tables. Currently: table[1...n] = {uID, <data>} Proposed: table[uID] = {<data>} Basically instead of an array, you have a list of keys (Which are the unit IDs) which point to values (The data) The reason you would do it this wa...
by Niobium
09 Jul 2009, 14:02
Forum: Lua Scripts
Topic: Central Build AI as lua widget!
Replies: 80
Views: 10340

Re: Central Build AI as lua widget!

gl.Rotate(Degrees, 0.0, 1.0, 0.0) will rotate in correct plane. (Around the y, i.e. vertical, axis) Note that it actually uses degrees and not radians, all the math.___ functions use radians. gl.Scale(x, y, z) will help solve the sizing problem, I would say it is a unitdef that is doing the sizing, ...
by Niobium
08 Jul 2009, 05:54
Forum: Lua Scripts
Topic: Central Build AI as lua widget!
Replies: 80
Views: 10340

Re: Central Build AI as lua widget!

Everything you said about CommandNotify is correct.

cmdOptions is alt/shift/control/meta modifiers. (i.e. cmdOptions.shift). There is also cmdOptions.coded for the functions which require options in that form.
by Niobium
07 Jul 2009, 10:01
Forum: Lua Scripts
Topic: unit_auto_com_group.lua
Replies: 23
Views: 1078

Re: unit_auto_com_group.lua

manolo_ wrote:big thx, so who wants to make my nuke-widget :D :D
What does it do?
by Niobium
04 Jul 2009, 11:33
Forum: Lua Scripts
Topic: Central Build AI as lua widget!
Replies: 80
Views: 10340

Re: Central Build AI as lua widget!

http://springrts.com/wiki/LuaCallinReturn Which is linked to from http://springrts.com/wiki/Lua_Scripting Update() just gets called constantly no matter what. GameFrame() gets called when a gameframe has passed, so its affected by game speed, paused/unpaused, game having started, etc. Update() will...
by Niobium
04 Jul 2009, 09:10
Forum: Lua Scripts
Topic: Central Build AI as lua widget!
Replies: 80
Views: 10340

Re: Central Build AI as lua widget!

Looks good. Replace widget:Update() with widget:GameFrame(n), where n is current gameframe. Move UpdateOneGroupsDetails into GroupChanged and remove from update(). (There is only one place where groupHasChanged is modified, so I don't know why you are polling it in update) widget:UnitCmdDone() and w...
by Niobium
04 Jul 2009, 05:57
Forum: Lua Scripts
Topic: Custom Formations 2
Replies: 112
Views: 10421

Re: Custom Formations 2

I'm using that version that vbs posted and the GUI LUA thingy still disables itself when I select too many units and I'm still getting errors and inability to form loads of units. Are you sure you are using the right version?.............. Just because you downloaded the new one doesn't mean you ar...
by Niobium
03 Jul 2009, 10:30
Forum: Lua Scripts
Topic: Custom Formations 2
Replies: 112
Views: 10421

Re: Custom Formations 2

Argh wrote:Eh? So ya fixed Option 2? That would be swell, Random is not great.
I ran like 10,000+ tests with algorithm #2, with random input of sizes 1 to 100, and it never got an error, so I'm assuming TFC was using an older version.
by Niobium
03 Jul 2009, 10:09
Forum: Lua Scripts
Topic: Custom Formations 2
Replies: 112
Views: 10421

Re: Custom Formations 2

I've deleted all links to any version of it on the forums, and the upload on jobjol, to try and control this version mess. Got a springdownloader account now, so the springdownloader version is the only, and most up to date, version available. Make sure you have version 1.2, which I uploaded today. ...
by Niobium
03 Jul 2009, 04:30
Forum: Lua Scripts
Topic: Custom Formations 2
Replies: 112
Views: 10421

Re: Custom Formations 2

Update on the bug You can recreate this every time by starting spring.exe with Empty script and /cheat /give 38 corthud. Draw some lines with all selected and it'll crash very fast. The issue seems to be in step 2. (as per the comments in the code), it looks like in the old spring none of this code...
by Niobium
02 Jul 2009, 06:01
Forum: Lua Scripts
Topic: Central Build AI as lua widget!
Replies: 80
Views: 10340

Re: Central Build AI as lua widget!

1) - 2) widget:TextCommand(command), this gets called when user types '/luaui <command>', this would be a nice way to change the group ingame (i.e. /luaui cbgroup 5), unless you want to make a button or some such (a lot of work for such a small thing) 3) Fairly easy isn't it? You would just need to ...
by Niobium
01 Jul 2009, 03:09
Forum: Lua Scripts
Topic: Custom Formations 2
Replies: 112
Views: 10421

Re: Custom Formations 2

For 18+... instead of doing a giant sort... why not break it up into several sorts over the next few frames? Then you'd get all of the advantages of a perfect sort, and none of the performance hit. Only issue then is breaking up the line drawn by the player into several sub-sections for each sort. ...

Go to advanced search