Loading...
  OR  Zero-K Name:    Password:   

Clearfactory widget

10 posts, 1188 views
Post comment
Filter:    Player:  
sort
HURRAY

Fisher-Price's MyFirstWidget(tm) is here!

Nothing special, just an exercise in LUA for me. All it does is clear the entire build queue for all selected factories when you press ";" (semicolon)... but i'd like to share it with you non the less :D

Only thing i'd like to know is how you can bind a call to your own widget with the zk_keys.lua instead of using the KeyPress() event.

http://pastebin.com/ff2sn4rt

EDIT
nicer version that is bindable with zk_keys.lua.
http://pastebin.com/bfs6SaTb

just add the line

{ "clearfactoryqueue", "MYKEY",},

to that file

Anyone that can make a nice icon picture? So we can add it to the next stable maybe? :P

oh, and thx again for the ZK LUA lesson CarRepairer :D
+0 / -0
I'm glad you asked. Don't use keypress, but instead add a spring "action." This action has a name and is tied to a function you create. Then, in zk_keys, we can add a hotkey based on that action name, and it can be added to epicmenu so anyone can bind it in the game. Look for "addaction" in the widgets.

Ideally this function should be within the gui widget like integral menu and keyboard menu, but since it hasn't been done yet, your widget won't hurt. Keep practicing that lua.
+0 / -0
10 years ago
I am looking to create something small like this too since I have just recently started learning lua. Is there anything else like this that people want?
+0 / -0
Here's a list of widget ideas I have been collecting (some are outdated):
Random Area Attack
- Bombard random spots in area with unit's weapon

Rally queue for individual units from factories (con, bombs)
- Give a queue to a con/bomb and select a factory, future cons/bombs get that queue instead of factory's

Athena rally queue
- Give Athena a queue, units built from it will inherit that queue

Gunship Jink
- Improves current gunship no-strafe behaviour to have small jink (as per gunship no swarm)

Build solar next to extractors
- automatically build solars in free space near mexes

Econ building priority
- Sets high priority on solar/wind and mexes depending on income state

Tactical missile launcher control
- Napalm/tacnuke guarding a shockley (and have an attack order after that) will time their attack command after so as to arrive 1.5 shield radius behind the shockley

Idle towers random fire
- Towers idling will slowly circle their range with shots... just in case
- Most applicable to llts vs cloak


Sniper Alert/Hunt (needs widget projectile detection)
- places marker at first sight of sniper round
- optional add-on: towers with nothing to do will fire on origin point if in range (cpu expensive)

Auto-jink (needs widget projectile detection)
- auto-swarm does not jink until detecting incoming projectile
- Note: CPU heavy

Shield Attack (not sure if possible)
- Looks for enemy shields in range of towers and makes towers attack them to drain shield power (stops if enemies come in range)

Initial Queue
- As in BA

Newton Control
- Experiment and use widgets to make newton cannons more accurate

Constructor Fight-Mexing
- Constructors on fight order build mexes

Reclaim pausing when (self/team) excessing metal

Auto-rebuild
- Mark buildings and constructors, cons will attempt to replace buildings when they are destroyed
- Good for radar, mex, windfarm

Nanotower reminder
- Factory + nanotower max spending < mex income + OD = reminder to build nanotowers!

Single hotkey to minimize/unminimize all Chilly GUI
+0 / -0
10 years ago
quote:
Constructor Fight-Mexing
- Constructors on fight order build mexes

I think I will try this one. I have actually found myself thinking it would be helpful for a while now too.
+0 / -0
Skasi
10 years ago
Add a button for this to the factory bar widget! :)
+0 / -0

10 years ago
quote:
Auto-rebuild
- Mark buildings and constructors, cons will attempt to replace buildings when they are destroyed
- Good for radar, mex, windfarm


isnt this already working?

-giva a con a build queue (of buildings only?)
-set unit on repeat (gree circle button)
=> unit will walk from all contruction sites and build at places where destroyed.
+0 / -0

10 years ago
Doesnt that consume the worker?
+0 / -0
10 years ago
Con spends lots of time walking between sites to check that it is not destroyed. Only checks the site next in queue.

If you have 20 mexes that are rarely destroyed and you want your con to assist factory otherwise, then you might use this.
+0 / -0

10 years ago
Shield attack is easy, you just fire at the ground if you're within weapon range + shieldgen radius of a shieldgen. You don't need to detect whether the shield is there, you just check for a shieldgen in that direction.

Building mexes on fight orders means a lot of cons that are meant to be reclaiming will get caught up building... it would have to default to off and be another 'hidden feature'.
+0 / -0