Amon_PRC8/_module/nss/di_comboplate.nss

19 lines
843 B
Plaintext
Raw Normal View History

2025-04-03 19:00:46 -04:00
#include "di_include"
void main()
{
if(GetLocalInt(OBJECT_SELF,"Activated")==FALSE)
{
string sSeedString = GetLocalString(GetObjectByTag("di_puz02"), "seedstring");
string sSoundString = GetLocalString(GetObjectByTag("di_puz02"), "soundstring");
string sSolution = GetLocalString(GetObjectByTag("di_puz02"), "solution");
int iPos = StringToInt(GetStringRight(GetTag(OBJECT_SELF), 1)) - 1;
int sPos = StringToInt(GetSubString(sSeedString, iPos, 1)) - 1;
string s = GetSubString(sSoundString, sPos, 1);
DelayCommand(1.0, di_PlaySound(s));
ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
sSolution = sSolution + s;
SetLocalString(GetObjectByTag("di_puz02"), "solution", sSolution);
SetLocalInt(OBJECT_SELF,"Activated",TRUE);
}
}