Hi i was wondering how to make the text dialogues for the talking for the ppl in the game?
Any ideas or code for it?
animindex+=1;
VisibilityState("Event Actor", DISABLE);
if (speech == 1)
{
VisibilityState("Event Actor", ENABLE);
if (transp > 0)
{
transp -= .05;
}
}
if (speech == 0)
{
if (transp < 1)
{
transp += .05;
}
if (transp == 1)
{
VisibilityState("Event Actor", DISABLE);
}
}
speaking = 0;
talk = 0;
sprintf(text, " ");
VisibilityState("Event Actor", DISABLE);
if (speaking == 1)
{
talk += 1;
}
EventDisable("Event Actor", EVENTANIMATION);
if(can_speak == 1)
{
speaking = 1;
talk = 1;
VisibilityState("Text", ENABLE);
EventDisable("Main Actor", EVENTKEYDOWN);
EventEnable("Event Actor", EVENTANIMATION);
}
if(can_speak == 0)
{
DestroyActor("Event Actor");
}
switch (talk)
{
case 1:
speech = 1;
sprintf(Text.text, "Here comes what you want your actor say first."); //first words
break;
case 2:
speech = 1;
sprintf(Text.text, "Here comes what you want your actor say second."); //second words
break;
case 3:
//This is for hiding the text
sprintf(Text.text, " ");
talk = 0;
speaking = 0;
speech = 0;
DestroyActor("Event Actor");
VisibilityState("Text", DISABLE);
EventEnable("Main actor", EVENTKEYDOWN);
break;
}
Users browsing this forum: No registered users and 1 guest