GetAttrib(id,attrib)

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
lpgamble
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 167
Joined: Mon Jun 25, 2007 8:00 pm
Location: Houston. Tx

GetAttrib(id,attrib)

Post by lpgamble »

In the GetAttrib function what is the label for UnitCost or is there some seperate GetUnitCost() function?
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr »

hiya lpgamble,

All of the attributes are in the squads.csv file. In your case, you want "Cost" ...

So, it would read GetAttrib(id,"Cost")
lpgamble
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 167
Joined: Mon Jun 25, 2007 8:00 pm
Location: Houston. Tx

Post by lpgamble »

I tried that it wasn't returning a value, could be a typo. I suspect "Cost" is not correct, it would be nice if all the column header labels were in the GetAttrib
pipfromslitherine
Site Admin
Site Admin
Posts: 9937
Joined: Wed Mar 23, 2005 10:35 pm

Post by pipfromslitherine »

No - the cost is actually an embedded value. The next update includes a function for retrieving it.

Cheers

Pip
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr »

pipfromslitherine wrote:No - the cost is actually an embedded value. The next update includes a function for retrieving it.

Cheers

Pip
Oh ... I didn't know that ... my next guess would have been trying the GetBaseAttrib function, but nevermind .
lpgamble
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 167
Joined: Mon Jun 25, 2007 8:00 pm
Location: Houston. Tx

Post by lpgamble »

That will be useful.
3 scenarios done so far with 14 units added!
Post Reply

Return to “Battle Academy : Modders Corner ”