Nexus Modding > Scripting

Scripting Issues

<< < (20/25) > >>

The Old Dragon:
Hi there Mularac,

I was kinda hoping to avoid sets if possible, trying to keep this script as independant as possible. If anyone modifies/creates their tactictypes then the script won't work too well (assuming that I can get it working to begin with  that is :P ).

But I'll keep that in mind  :)

Mularac:
But the engines are to be placed on the 50 set, otherwise it won't work well at all, specially in campaign scripting.

Arparso:
Instead of checking for Inset(), you could always replace that with S.Engine instead:


--- Code: ---SelectShips(MainList, S.Race!=#race_player);  //select all the non-player ships
execlist(MainList,
E.Engines := GetFreeSel();
E.EngineCount := SelectDevices(E.Engines, S.This, S.Engine); //put in the list 1 all the devices that fall under the set 50 (engines)
If(E.EngineCount > 0, removeItem(MainList, s.this)); //and if that list isn't empty then remove that ship from the mainList (because it has at least one engine)
DeleteSelect(E.Engines);
);
--- End code ---

The Old Dragon:
@ Mularac,

Hmmm, there's something I wasn't aware of :)

Thanks guys  :thumbsup:

Mularac:
i don't know about the AI or anything else, but I know for a fact that the weapon and ship configuration screen handles the devices according to their sets (as to where to place the devices in each category and all).
But honestly i don't know if there's an other issue... but nexus has many hardcoded issues, so I don't know....
 

@Arparso:  Why did you use the E.EnginesCount variable? Isn't it enough by using the E.engines list?

-- Just corrected myself: it's more efficient to check a variable that use walk trough a list... that's why you used enginesCount, right?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version