Adding toggle button

Everything about mods can be found here.

Moderator: Morax

Adding toggle button

Postby Evildrew » 01 Jun 2019, 22:10

Hi,

I am looking to add a toggle button akin to the engineering station/drone button that lets you switch between the units. This is for the mobile factory units as featured in equilibrium.
Evildrew
Avatar-of-War
 
Posts: 248
Joined: 18 Sep 2015, 11:41
Has liked: 1 time
Been liked: 36 times
FAF User Name: Evildrew

Re: Adding toggle button

Postby Franck83 » 06 Jun 2019, 13:24

Hi Evildrew,

The simple way is taking a look at an existing toggle script and copy. You may have to mod several lua files :
- unit bp to add the toggle button
- commandmode.lua for the custom selection script.
- orders_mini.lua for the slot orders
- unitview.lua for refreshing unit control buttons.

Hope this help.
Alliance of Heroes Mod is out ! Try it ! It's in the Mod Vault !
User avatar
Franck83
Evaluator
 
Posts: 538
Joined: 30 Dec 2016, 11:59
Location: France
Has liked: 114 times
Been liked: 122 times
FAF User Name: Franck83


Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest