Add a unit by squads ID number instead of name

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
rf900
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 339
Joined: Fri May 04, 2012 6:59 am

Add a unit by squads ID number instead of name

Post by rf900 »

I am trying to add groups of units in a semi random manner, the only way I have right now is by writing the string name of the unit. Is there any other way to do it based on the ID found in the squads file or other numeric value that will let me do the same with less lines and easier to edit in the future?
pipfromslitherine
Site Admin
Site Admin
Posts: 9898
Joined: Wed Mar 23, 2005 10:35 pm

Re: Add a unit by squads ID number instead of name

Post by pipfromslitherine »

It's really asking for trouble, as any change in order in the squads file will break it all. And there aren't really any other guaranteed unique items in the unit data.

Cheers

Pip
follow me on Twitter here
Post Reply

Return to “Battle Academy : Modders Corner ”