![]() |
CTP2 Bureau The Modding Knowledgebase |
|
Apolyton CTP2 forums Apolyton CTP2 archives Source Code Project SVN |
![]() |
Search the site: |
SLIC-Reference :
|
Arguments: | location|unit|city[, player, messageid] | Type: | void |
Put an eyepoint on the message. |
Adds an "eye" button to the current message pointing to the specified location or object. If player and messageid are passed, call that message when the eyepoint is clicked. |
SFN_ERROR Slic_EyePoint::Call(SlicArgList *args) { MapPoint point; BOOL res; Unit unit; if (args->Count() != 1 && args->Count() != 3) return SFN_ERROR_NUM_ARGS; res = args->GetPos(0, point); // Attempt to find a city or army always, so unit will have been filled // when constructing the SlicEyePoint later. if (args->GetCity(0, unit) || args->GetUnit(0, unit)) { if ((!res) && unit.IsValid()) { point = unit.RetPos(); res = true; } } if (!res) { return SFN_ERROR_TYPE_BUILTIN; } MBCHAR text[k_MAX_MSG_LEN]; res = args->m_argValue[0].m_symbol->GetText(text, k_MAX_MSG_LEN); if(!res) text[0] = 0; DPRINTF(k_DBG_SLIC, ("Slic_EyePoint: (%d,%d,%d)\n", point.x, point.y, 0)); SlicEyePoint *ep = NULL; if (args->Count() > 1) { sint32 player; if(!args->GetPlayer(1, player)) return SFN_ERROR_TYPE_ARGS; if(args->m_argValue[2].m_type != SA_TYPE_SEGMENT) { return SFN_ERROR_TYPE_ARGS; } if(!(args->m_argValue[2].m_segment)) { SlicSymbolData *sym = args->m_argValue[2].m_symbol; if(sym) { strcpy(g_missingSegment, sym->GetName()); } else { strcpy(g_missingSegment, "???"); } return SFN_ERROR_NOT_SEGMENT; } ep = new SlicEyePoint(point, text, 0, EYE_POINT_TYPE_GENERIC, unit, player, args->m_argValue[2].m_segment); } else { ep = new SlicEyePoint(point, text, 0, EYE_POINT_TYPE_GENERIC, unit, 0, NULL); } g_slicEngine->GetContext()->AddEyePoint(ep); return SFN_ERROR_OK; } |
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: 102516 unique users since 02.05.2004 (» Site Statistics) Hosted by: WebhostOne |