Closed Cablefish1 closed 6 years ago
`//Cablefish's less simple description trigger system
//colored text for the win!
void main() { //Declare oPC as the player who entered the trigger object oPC = GetEnteringObject(); object oSound = GetObjectByTag("gui_prompt"); //Remember to paint the sound and maybe adjust the properties before it works
if (GetLocalInt(OBJECT_SELF,GetPCPlayerName(oPC)) != 1) //test if PC has been here before
{
//Send text to oPC. The variable is the sString I probably have to create different tags or strange stuff might happen
AssignCommand(oPC, PlaySound("gui_prompt")); //play GUI sound
string sColoredText = ColorText("* Description *", "cyan");
string sMsg = ColorText(GetLocalString(OBJECT_SELF, "sMsg"), "cyan");
FloatingTextStringOnCreature(sColoredText, oPC, FALSE);
DelayCommand(0.5,SendMessageToPC(oPC, sMsg));
SetLocalInt(OBJECT_SELF,GetPCPlayerName(oPC),1); //set a variable on the trigger called the PC's name to 1 so script only fires one
}
}
`
The exploration description trigger need to play the sound "gui_prompt" when triggered.
Idea: Maybe a single exclamation mark "!" should float over the character when they are triggered too.