GLOBAL CODE:
- Code: Select all
void talk(int npcid)
{
Dialogue.x=Guy.x; //Place the dialogue box near the guy
Dialogue.y=Guy.y;
if(npcid==1 && pultquest==0)//Beavis and Butthead
{
ChangeAnimation("DialFace", "Beavis", FORWARD); //Beavis says "Slysh baklan!" (translit)
strcpy(DialText.text,"Slysh baklan!");
Dialog(); //pause
strcpy(DialText.text, "My poteriali 3 pylta ot teleka!");
Dialog();
ChangeAnimation("DialFace", "Butthead", FORWARD); //Butthead face
strcpy(DialText.text,"Eto polnyi otstoi :(");
Dialog();
ChangeAnimation("DialFace", "Beavis", FORWARD);
strcpy(DialText.text,"Naidi ix i prinesi nam za $100");
Dialog();
Dialogue.x=2000; //Kick the dialogue box out of here
Dialogue.y=2000;
pultquest=1; //activate the quest
}
}
Dialog(); pauses the game and shows the Unpause button.
And NPC, Beavis and Butthead - code: talk(1);
"Dialogue" is the filled region and is a parent of all elements - Face, background and text
But works only "ChangeAnimation" and Dialog()... GE ignores the strcpy and Dialogue.x=Guy.x; Dialogue.y=Guy.y;. Why?