I'm now having another really odd problem.
Moderators: adeyke, VampD3, eriqchang, Angelus3K
-
- Royal Servant Status
- Posts: 116
- Joined: Tue May 04, 2004 3:07 pm
- Contact:
I'm now having another really odd problem.
" Type mismatch: Cannot convert 'Object*' to 'int' "
I have a conditional set up "if checked door = 1, rundialog blah de blah"
if checked door = 0, run this script:
here it is in the room script.
function object0_b() {
// script for Object 0 (Bathroom Door): Interact object
character[EGO].Walk(161, 106, eBlock, eWalkableAreas);
RunDialog(;
object[oBdoor].SetView(0, 3);
object[oBdoor].Animate(0, 4, eOnce, eBlock, eForwards);
character[EGO].ChangeView(9);
object[oBdoor].Animate(1, 4, eOnce, eBlock, eForwards);
Wait(240);
object[oBdoor].Animate(0, 4, eOnce, eBlock, eForwards);
Wait(30);
object[oBdoor].Animate(1, 4, eOnce, eBlock, eForwards); < - - - - This is the line it is having a problem with.
character[EGO].ChangeView(1);
character[EGO].FaceLocation(180, 20, eBlock);
RunDialog(12);
PlaySound(4);
RunDialog(13);
SetGraphicalVariable("checked door", 1);
return;
}
Help?
I have a conditional set up "if checked door = 1, rundialog blah de blah"
if checked door = 0, run this script:
here it is in the room script.
function object0_b() {
// script for Object 0 (Bathroom Door): Interact object
character[EGO].Walk(161, 106, eBlock, eWalkableAreas);
RunDialog(;
object[oBdoor].SetView(0, 3);
object[oBdoor].Animate(0, 4, eOnce, eBlock, eForwards);
character[EGO].ChangeView(9);
object[oBdoor].Animate(1, 4, eOnce, eBlock, eForwards);
Wait(240);
object[oBdoor].Animate(0, 4, eOnce, eBlock, eForwards);
Wait(30);
object[oBdoor].Animate(1, 4, eOnce, eBlock, eForwards); < - - - - This is the line it is having a problem with.
character[EGO].ChangeView(1);
character[EGO].FaceLocation(180, 20, eBlock);
RunDialog(12);
PlaySound(4);
RunDialog(13);
SetGraphicalVariable("checked door", 1);
return;
}
Help?
-
- Royal Servant Status
- Posts: 116
- Joined: Tue May 04, 2004 3:07 pm
- Contact:
Ok... I fixed it...
character[EGO].Walk(161, 106, eBlock, eWalkableAreas);
RunDialog(;
object[0].SetView(3);
object[0].Animate(0, 4, eOnce, eBlock, eForwards);
character[EGO].ChangeView(9);
object[0].Animate(0, 4, eOnce, eBlock, eForwards);
Wait(240);
object[0].Animate(0, 4, eOnce, eBlock, eForwards);
Wait(30);
object[0].Animate(1, 4, eOnce, eBlock, eForwards);
character[EGO].ChangeView(1);
character[EGO].FaceLocation(180, 20, eBlock);
RunDialog(12);
PlaySound(4);
RunDialog(13);
SetGraphicalVariable("checked door", 1);
return;
Problem is things happen in all kinds of weird order. GAH. As in, he walks to it, it opens, he steps in, it opens and stays open, it closes and opens, he appears, it makes a sound... then all 3 dialogs run.
character[EGO].Walk(161, 106, eBlock, eWalkableAreas);
RunDialog(;
object[0].SetView(3);
object[0].Animate(0, 4, eOnce, eBlock, eForwards);
character[EGO].ChangeView(9);
object[0].Animate(0, 4, eOnce, eBlock, eForwards);
Wait(240);
object[0].Animate(0, 4, eOnce, eBlock, eForwards);
Wait(30);
object[0].Animate(1, 4, eOnce, eBlock, eForwards);
character[EGO].ChangeView(1);
character[EGO].FaceLocation(180, 20, eBlock);
RunDialog(12);
PlaySound(4);
RunDialog(13);
SetGraphicalVariable("checked door", 1);
return;
Problem is things happen in all kinds of weird order. GAH. As in, he walks to it, it opens, he steps in, it opens and stays open, it closes and opens, he appears, it makes a sound... then all 3 dialogs run.
Code: Select all
function object0_b() {
// script for Object 0 (Bathroom Door): Interact object
character[EGO].Walk(161, 106, eBlock, eWalkableAreas);
RunDialog(;
oBdoor.SetView(0, 3);
oBdoor.Animate(0, 4, eOnce, eBlock, eForwards);
character[EGO].ChangeView(9);
oBdoor.Animate(1, 4, eOnce, eBlock, eForwards);
Wait(240);
oBdoor.Animate(0, 4, eOnce, eBlock, eForwards);
Wait(30);
oBdoor.Animate(1, 4, eOnce, eBlock, eForwards); < - - - - This is the line it is having a problem with.
character[EGO].ChangeView(1);
character[EGO].FaceLocation(180, 20, eBlock);
RunDialog(12);
PlaySound(4);
RunDialog(13);
SetGraphicalVariable("checked door", 1);
return;
}
As an alternative you could have written:
Code: Select all
object[0].Animate(1, 4, eOnce, eBlock, eForwards); < - - - - This is the line it is having a problem with.
-
- Royal Servant Status
- Posts: 116
- Joined: Tue May 04, 2004 3:07 pm
- Contact:
Aha. Thanks. I still have the problem of things out of order. Here's my edit...
again...
Problem is things happen in all kinds of weird order. GAH. As in, he walks to it, it opens, he steps in, it opens and stays open, it closes and opens, he appears, it makes a sound... then all 3 dialogs run.
Code: Select all
// script for Object 0 (Bathroom Door): Interact object
if (GetGraphicalVariable("bdoor") == 1) {
RunDialog(6);
}
if (GetGraphicalVariable("bdoor") == 0) {
character[EGO].Walk(161, 106, eBlock, eWalkableAreas);
RunDialog(8);
oBdoor.SetView(3);
oBdoor.Animate(0, 4, eOnce, eBlock, eForwards);
character[EGO].ChangeView(9);
oBdoor.Animate(0, 4, eOnce, eBlock, eForwards);
Wait(240);
oBdoor.Animate(0, 4, eOnce, eBlock, eForwards);
Wait(30);
oBdoor.Animate(1, 4, eOnce, eBlock, eForwards);
character[EGO].ChangeView(1);
character[EGO].FaceLocation(180, 20, eBlock);
RunDialog(12);
PlaySound(4);
RunDialog(13);
SetGraphicalVariable("bdoor", 1);
return;
}
again...
Problem is things happen in all kinds of weird order. GAH. As in, he walks to it, it opens, he steps in, it opens and stays open, it closes and opens, he appears, it makes a sound... then all 3 dialogs run.
-
- Royal Servant Status
- Posts: 116
- Joined: Tue May 04, 2004 3:07 pm
- Contact:
Okay, I just had something out of order. However!
Dialog 8 is still playing at the end, right before 12 and 13. It doesn't happen when it's supposed to. I don't get it.
Back when I was doing "display message" or "character.say" functions, I didn't have this problem. Why should it be different with dialog?
Hell with it. I'll try calling a script from dialog 8.
Dialog 8 is still playing at the end, right before 12 and 13. It doesn't happen when it's supposed to. I don't get it.
Back when I was doing "display message" or "character.say" functions, I didn't have this problem. Why should it be different with dialog?
Hell with it. I'll try calling a script from dialog 8.