SetAttrib
Posted: Mon Oct 22, 2012 10:28 am
I've the following:
shots = GetAttrib(id, "shots");
Log ("shots", shots); // this show 2
SetAttrib(id, "shots", 0);
shots = GetAttrib(id, "shots");
Log ("shots 2", shots); // this shows 0
The last log shows 0, but the unit(s) still have the two bullets and are able to fire.
I don't want to reduce the AP atribute to 0, because units will be able to move.
shots = GetAttrib(id, "shots");
Log ("shots", shots); // this show 2
SetAttrib(id, "shots", 0);
shots = GetAttrib(id, "shots");
Log ("shots 2", shots); // this shows 0
The last log shows 0, but the unit(s) still have the two bullets and are able to fire.
I don't want to reduce the AP atribute to 0, because units will be able to move.