FUNCTION ALL_CHECK
Posted: Fri Mar 11, 2016 3:41 pm
The documentation stats:
FUNCTION ALL_CHECK_<name>( me, unit, tilex, tiley )
This function is used to determine whether a unit can perform a task. The return value can be either the cost of the action in AP, or -2 if you with the task icon not to be shown, or -1 if you wish to show the icon in a disabled state.
In the load.bsf
FUNCTION CHECK_UNIT_LOAD
if you add at the end
Log("ret",ret);
return ret ;
}
you get 8 even if the truck icon appears as disabled, (can't load) for example because infantry has less than 8 MP.
I can't understand how it works. Should return -1 no?
FUNCTION ALL_CHECK_<name>( me, unit, tilex, tiley )
This function is used to determine whether a unit can perform a task. The return value can be either the cost of the action in AP, or -2 if you with the task icon not to be shown, or -1 if you wish to show the icon in a disabled state.
In the load.bsf
FUNCTION CHECK_UNIT_LOAD
if you add at the end
Log("ret",ret);
return ret ;
}
you get 8 even if the truck icon appears as disabled, (can't load) for example because infantry has less than 8 MP.
I can't understand how it works. Should return -1 no?