SLIC-Reference : SetActionKey
CTP2 Bureau
The Modding
Apolyton CTP2 forums
Apolyton CTP2 archives
Source Code Project SVN

SLIC-Reference : : SetActionKey  

Arguments: index, string Type: void

Set the key for key..pressed to the first character in string. (Or to ctrl + second character if the first character is '^')

To write a trigger that fires when the key is pressed, use the trigger variable key.n.pressed, where n is the index you passed to SetActionKey. E.G.: ... SetActionKey(1, "a"); ... trigger 'aKeyPressed' when (key.1.pressed) { Message(g.player, "TheAKeyWasPressed"); }


SFN_ERROR Slic_SetActionKey::Call(SlicArgList *args)
	if(args->Count() != 2)

	sint32 index;
	if(!args->GetInt(0, index))
	char *keystring;
	if(!args->GetString(1, keystring))

	if(keystring[0] != '^') {
		g_slicEngine->SetTriggerKey(index - 1, keystring[0]);
	} else {
		g_slicEngine->SetTriggerKey(index - 1, keystring[1] + 128);
	return SFN_ERROR_OK;

Information last updated by BureauBert on 26.06.2009

User Comments:

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.

Subject / Title*:
(A maximum of characters left)
Your name:*
Your website (URL):

*) Required fields

Unkown Tag: Name

This site is currently maintained by: BureauBert (Webmaster)  Maquiladora (Manager)  Legal Notice: Legal Notice Statistics: 102496 unique users since 02.05.2004 (» Site Statistics) Hosted by: WebhostOne
Share this page:  VK Facebook Twitter LiveJournal OK MR Google+ LinkedIn tumblr Pinterest Blogger Digg Evernote