At last answer us, say if you will upload it or not please.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: Haggis on Sun 08/12/2019 17:45:45
EDIT - to add clarity to the above - you would create a view for each speech animation, then prior to the dialogue starting you would generate a random number, which would set the character speech view to one of your various speech views.
cCharacter.Walk(12, 84, eBlock, eWalkableAreas);
cCharacter.Say("Hello, who are you?");
cCharacter.Walk(12, 84, eBlock, eWalkableAreas);
cCharacter.ChangeView(2); //for the second animation or 3 for the third animation
cCharacter.Say("Hello, who are you?");
cCharacter.Walk(12, 84, eBlock, eWalkableAreas);
cCharacter.Lock(2); //for the second animation or 3 for the third animation
cCharacter.Animate(2, 0, 5, eBlock, eForwards); // with this first play the animation and then speak
cCharacter.Animate(2, 0, 5, eNoBlock, eForwards); // with this play the first frame of the animation, stop it, and then speak
cCharacter.Say("Hello, who are you?");
cCharacter.UnlockView(); //returns to NormalView
function cMiniSpider_AnyClick()
{
// WALK TO
if (UsedAction(eMA_WalkTo)) {
Go();
}
// TALK TO
else if (UsedAction(eGA_TalkTo)) {
if (cSpider.Room == 30){
cSpider.Say("Hola.");
cMiniSpider.Say("Hola, señor.");
cSpider.Say("Soy una araña.");
cMiniSpider.Say("Lo se, yo tambien pero mas pequeña.");
}
if (cSpider.Room == 40){
cSpider.Say("¿Sabes por donde hay que seguir? ");
cMiniSpider.Say("No.");
}
if (cSpider.Room == 90){
cSpider.Say("¿Te resulta familiar este lago?");
cMiniSpider.Say("Si, ya estamos muy cerca.");
}
else
Unhandled();
}
}
function Unhandled(int door_script) {
// unhandled USE INV
else if (UsedAction(eGA_UseInv)) player.Say("No puedo usarlo con eso.");
// unhandled TALK TO
else if (UsedAction(eGA_TalkTo)) {
if (type==2) player.Say("No tengo nada que decirle ahora mismo.");
else player.Say("No tengo nada que decir.");
}
}
else
Unhandled();
else {
Unhandled();
{
Quote from: Khris on Mon 11/11/2019 12:57:05
Ha, I completely missed that thanks to the flawless indentation
Btw, I guess those .Transparency lines are supposed to fade out the sprites but it won't work like that. As I'm sure you have noticed, the sprite simply turns invisible immediately. You'll want a loop with a Wait(1); inside to have a visible fade (and use a custom function for that in order to avoid tons of duplicate code).
Quote from: CaptainD on Mon 11/11/2019 10:31:18
The problem might be that you don't have the ELSE function (lines 17-26) encapsulated with {}.
function room_FirstLoad()
{
cSpider.Walk(278, 133, eBlock, eWalkableAreas);
cMiniSpider.EnterRoom(10, 330, 135, eDirectionLeft);
cMiniSpiderWalk(251, 138, eBlock, eAnywhere);
}
function room_LeaveTop()
{
if (HasPlayerBeenInRoom(11)) {
cSpider.Transparency=30;
cSpider.Transparency=60;
cSpider.Transparency=100;
cSpider.ChangeRoom(11, 10, 117, eDirectionRight);
}
else
cSpider.Transparency=30;
cSpider.Transparency=60;
cSpider.Transparency=100;
cMiniSpider.Walk(164, 92, eBlock, eWalkableAreas);
cMiniSpider.Transparency=30;
cMiniSpider.Transparency=60;
cMiniSpider.Transparency=100;
cSpider.ChangeRoom(11, 10, 117, eDirectionRight);
}
function room_FirstLoad()
{
cSpider.Transparency=0;
cSpider.Walk(16, 117, eBlock, eAnywhere);
}
function room_AfterFadeIn()
{
cMiniSpider.Transparency=0;
cMiniSpider.EnterRoom(11, 0, 117, eDirectionRight);
cMiniSpider.Walk(76, 122, eBlock, eAnywhere);
}
if(UsedAction(eGA_UseInv)) {
if (cSpider.ActiveInventory == iSpiderWeb) {
cSpider.Walk(113, 132, eBlock, eWalkableAreas);
cSpider.LockView(27);
cSpider.x+=30; // To match the walk sprite
cSpider.Animate(2, 5, eOnce, eBlock, eForwards);
cSpider.UnlockView();
}
}
if(UsedAction(eGA_UseInv)) {
if (cSpider.ActiveInventory == iSpiderWeb) {
cSpider.Walk(113, 132, eBlock, eWalkableAreas);
cSpider.LockView(27);
cSpider.Animate(2, 5, eOnce, eBlock, eForwards);
cSpider.UnlockView();
}
}
if(UsedAction(eGA_UseInv)) {
if (cSpider.ActiveInventory == iSpiderWeb) {
cSpider.Walk(113, 132, eBlock, eWalkableAreas);
cSpider.ChangeView(27);
cSpider.Walk(220, 122, , eBlock, eAnywhere);
}
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.100 seconds with 14 queries.