19 lines
843 B
Plaintext
19 lines
843 B
Plaintext
#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);
|
|
}
|
|
}
|