unit behaviour scripting

unit behaviour scripting

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
chhh
Posts: 3
Joined: 23 May 2008, 21:05

unit behaviour scripting

Post by chhh »

i'd like to add some new behaviour types for units (like by default they have roam and hold pos). i think what i need is a group ai: i want to select a group of ground attacking units, jammers and artillery, set their group behaviour to my custom made so they moved around the map according to new rules (like heavy tanks first, jammers right behind streched all over the attack frontline, then goes arty..). but i can't find any info on group ai except for a few bits on mexUpgrader.
or what i want can be done with lua somehow?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: unit behaviour scripting

Post by Argh »

Short answer: probably easier to do with Lua than with a new Helper AI. It'd be pretty easy to do, if all units move at the same speed. Much, much, much harder if you want it to factor in speeds properly.
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Re: unit behaviour scripting

Post by LordMatt »

This kind of widget has already been written by quantum. You can get it from CA SVN
chhh
Posts: 3
Joined: 23 May 2008, 21:05

Re: unit behaviour scripting

Post by chhh »

i've looked through the whole repository following your link, but didn't find what i've been looking for. (and the link itself only leads to a widget that sets specific units to hold position as they come out of factory)

i want units group movement improved... at least i'd like to force a group move at the speed of the slowest unit in it (setting other units to guard the slowest is not an option).
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Re: unit behaviour scripting

Post by LordMatt »

hmm I guess I didn't read your post carefully enough. Use ctrl + move to get units to stay in formation.
User avatar
Crayfish
Posts: 481
Joined: 12 Feb 2008, 12:39

Re: unit behaviour scripting

Post by Crayfish »

Yeah, this already happens - ctrl + click forces formation and sets movement to the speed of the slowest.
chhh
Posts: 3
Joined: 23 May 2008, 21:05

Re: unit behaviour scripting

Post by chhh »

thx all!
Post Reply

Return to “Lua Scripts”