Help with useful UI mod

Post here if you want to help developing something for FAF.

Help with useful UI mod

Postby Sir Prize » 28 Mar 2015, 09:58

Hello

I'm trying to make a mod that deselects certain units that are assisting other units in a drag box selection - basically mobile shield, stealth and land scouts. I've used the code in the awesome SelenDeselect mod to try and make this happen, but I just don't know lua syntax. At the moment my mod deselects idle Selens that are switched to gold fire - like the original mod, but nothing else. Can someone have a look at the modules in this folder and see what can be done? And tell me what to change? I'd like to be more useful and this will help me learn :)
Attachments
SupportUnitDeselect.zip
(7.15 KiB) Downloaded 82 times
User avatar
Sir Prize
Evaluator
 
Posts: 573
Joined: 24 May 2014, 10:29
Has liked: 77 times
Been liked: 91 times
FAF User Name: Sir-Prize

Re: Help with useful UI mod

Postby Vee » 28 Mar 2015, 12:55

Nice! I was trying to make exactly the same mod, but I could not figure out a good way of determining which unit a given unit is assisting.
Vee
Evaluator
 
Posts: 677
Joined: 04 Dec 2013, 20:43
Has liked: 275 times
Been liked: 225 times
FAF User Name: Vee

Re: Help with useful UI mod

Postby Sir Prize » 28 Mar 2015, 13:06

I think I can see in the code, if you know the syntax, where you can do something based on what order a unit has, in the "SelenDeselect" and "main" docs in the modules folder for example.

Credit goes to yorick, who wrote the initial mod by the way. It's awesome and everyone who ever plays Sera should get it.
User avatar
Sir Prize
Evaluator
 
Posts: 573
Joined: 24 May 2014, 10:29
Has liked: 77 times
Been liked: 91 times
FAF User Name: Sir-Prize

Re: Help with useful UI mod

Postby nine2 » 28 Mar 2015, 16:23

hmmm. perhaps i have the skill to make this now
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: Help with useful UI mod

Postby nine2 » 01 Apr 2015, 12:58

Vee wrote: I could not figure out a good way of determining which unit a given unit is assisting.


Code: Select all
         local guardedUnit = unit:GetGuardedEntity()
         if guardedUnit and not guardedUnit:IsDead() then
            skipped = true
         end
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: Help with useful UI mod

Postby nine2 » 01 Apr 2015, 12:59

i got this mod working and will put on vault soon
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: Help with useful UI mod

Postby Vee » 01 Apr 2015, 13:07

I think I tested that one too. Does that work when the unit is still on its way? O_O
Vee
Evaluator
 
Posts: 677
Joined: 04 Dec 2013, 20:43
Has liked: 275 times
Been liked: 225 times
FAF User Name: Vee

Re: Help with useful UI mod

Postby nine2 » 01 Apr 2015, 16:51

I put the mod in the vault. More info here viewtopic.php?f=2&t=9678
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine


Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest