SetAttrib...Action Points

Moderators: rbodleyscott, Slitherine Core, Gothic Labs

Post Reply
ElMinotauro
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 23
Joined: Sun Jun 14, 2015 11:02 pm

SetAttrib...Action Points

Post by ElMinotauro »

Hi,

Could say me if will be posible to modifed the AP (Action Points) during the game to a individual unit?
Had I use the sentence SetAttrib(id,string,value)?
How could it be done?
Id= Would it be the individual unit ?
string = Would it be the Attribute AP ?
value = ?

Bye
ElMinotauro
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 23
Joined: Sun Jun 14, 2015 11:02 pm

Re: SetAttrib...Action Points

Post by ElMinotauro »

Hi,

I have it checked
It would be for example: SetAttrib(1003,"AP",12);
So the unit 1003 get a AP=12 during the game

Bye
ElMinotauro
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 23
Joined: Sun Jun 14, 2015 11:02 pm

Re: SetAttrib...Action Points

Post by ElMinotauro »

Hi,

Other checking.
I have created a new unit with AP=0
Obviously in the game this new unit appers with AP=0
With a script you can to setting to AP12. Anyway at the moment i have not been able to move the unit. Always Its destination is -1 -1
I don´t know the reason at the moment

Bye
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28330
Joined: Sun Dec 04, 2005 6:25 pm

Re: SetAttrib...Action Points

Post by rbodleyscott »

The AP is reset to the Squads file value at the start of each turn. So if you want to script it to differ from the Squads file value, you will need to set it differently each turn after the AP has been reset in StartTurn(me) in startTurn.bsf

The more usual thing to do would be to set it to what you want it to be for the unit in the Squads file.
Richard Bodley Scott

Image
ElMinotauro
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 23
Joined: Sun Jun 14, 2015 11:02 pm

Re: SetAttrib...Action Points

Post by ElMinotauro »

Hi,

Ok

Kind regards
Post Reply

Return to “Modders Corner”