![]() |
CTP2 Bureau The Modding Knowledgebase |
|
Apolyton CTP2 forums Apolyton CTP2 archives Source Code Project SVN |
![]() |
Search the site: |
SLIC-Reference :
|
Arguments: | location|unit|city|army | Type: | void |
Add a recenter event on location to the animation queue |
The argument of the AddCenter function has to be something that has a location, but is not restricted to a location_t. Using a unit_t (or city_t) variable as argument works just as well. The "args->GetPos" line decides whether a location can be returned (BTW: army_t will work as well). (information provided by Fromafar).
Example:
HandleEvent(CreateCity) post { AddCenter(city[0].location); } //causes a recenter on a city when it has been built. |
tested
working
SFN_ERROR Slic_AddCenter::Call(SlicArgList *args) { if(args->Count() != 1) return SFN_ERROR_NUM_ARGS; MapPoint pos; if(!args->GetPos(0, pos)) return SFN_ERROR_TYPE_ARGS; g_director->AddCenterMap(pos); return SFN_ERROR_OK; } |
More information available at Apolyton here
Using this form you may add your own observations concerning the above item, e.g. additional hints for usage, limitations, oddities etc. Please note this is not the place for asking questions or carrying out discussions about modding - please refer to the Apolyton CTP2 Modification Forum on that purpose.
*) Required fields
![]() |
This site is currently maintained by: BureauBert (Webmaster) Maquiladora (Manager) Legal Notice: Legal Notice Statistics: 102497 unique users since 02.05.2004 (» Site Statistics) Hosted by: WebhostOne |