Hi!
Somewhere in this big cutscene cog I've added a SetThingModel() to give the illusion of something being very big. But, the new model refuses to be set. Why?
The SetThingModel is highlighted in red. You'll find it. And please help! Why won't it set new model? Thanks.
/Edward
Somewhere in this big cutscene cog I've added a SetThingModel() to give the illusion of something being very big. But, the new model refuses to be set. Why?
Code:
# Time to dock with the Monster
#
# By Edward
symbols
message startup
message pulse
message activated
thing ISD
thing DEST
thing enterCam
thing ISDPovCam
thing DESTHoleCam
thing DESTSideCam
thing Ky
thing windowView
thing frontConsole
thing ST1
thing ST2
thing ST2_WalkTo
thing crossCam
thing backDoor
thing backElev
vector ISDNextToLastFrame
vector ISDLastFrame
vector CrCFrame1
vector CrCFrame2
vector lv local
vector lvr local
sound enterISD
sound ISDStops
sound ISDCrash
sound rumbles
sound confirmClick
sound bleep
sound codeClicks
sound clampOnDock1
sound clampOnDock2
sound clampOnDock3
sound lockedDoor
sound ky_Permission
sound cc_Granted
sound cc_Prepare
sound cc_Mark
sound ky_hohum
sound ky_whoa
sound cc_RequestCode
sound cc_RptRequestCode
sound ky_sorry
sound ky_ThingsBIG
sound ST2_Problem
sound ST1_DoorsWelded
sound ST2_ShouldGetTourch
sound ST1_YeahYouGo
model ky_Normal
model ky_WideEyed
model ky_Blink
model smallerISD
keyframe ky_StandThere
keyframe ky_TappingConsole
keyframe ky_LookingUp
keyframe ky_TappingCode
keyframe ST1_KnockDoor
int ch1=1 local
int ch2=2 local
int ch3=3 local
int ch4=4 local
int k=-1 local
surface skipper0 linkid=3
surface skipper1 linkid=3
surface skipper2 linkid=3
surface skipper3 linkid=3
surface skipper4 linkid=3
surface skipper5 linkid=3
surface blurfx4
surface blurfx5
cog beginplay
cog musicstop
int skipping=0 local
flex i local
int j local
end
#
code
startup:
MoveToFrame(ISD, 0, 1000);
k=PlayKey(Ky, ky_standThere, 1, 0x0);
SetActorFlags(GetLocalPlayerThing(), 0x840000);
if(skipping==0) { sleep(1); }
SetFaceType(blurfx4, 0x2);
SetFaceType(blurfx5, 0x2);
SetCameraFocus(0, enterCam);
SetCameraFocus(1, enterCam);
MoveToFrame(ISD, 1, 100);
ch1=PlaySoundLocal(enterISD, 0, 0, 0x1);
ch4=PlaySoundThing(rumbles, ISD, 1, -1, 100, 0x81);
ChangeSoundPitch(ch1, .5, 1);
ChangeSoundVol(ch1, 1, 1);
sleep(1);
AttachThingToThing(ISDPovCam, ISD);
ch2=PlaySoundThing(ISDStops, ISD, 1, -1, 100, 0x80);
ChangeSoundPitch(ch2, .5, 0.05);
MoveToFrame(ISD, 2, 1);
if(skipping==0) { sleep(0.25); }
ChangeSoundPitch(ch1, 0.1, 1);
StopSound(ch1, 1);
ch2=PlaySoundThing(ISDCrash, ISD, 1, -1, 100, 0x80);
ChangeSoundPitch(ch2, 0.25, 0.05);
if(skipping==0) { sleep(2); }
SetCameraFocus(0, windowView);
SetCameraFocus(1, Ky);
ClearFaceType(blurfx4, 0x2);
ClearFaceType(blurfx5, 0x2);
if(skipping==0) { sleep(1); }
StopKey(Ky, k, 1);
k=-1;
k=PlayKey(Ky, ky_TappingConsole, 1, 0x0);
PlaySoundThing(ky_Permission, Ky, 1, -1, -1, 0x80);
PlaySoundThing(ky_Permission, ISD, 1, -1, -1, 0x80);
PlaySoundThing(bleep, frontConsole, 1, -1, -1, 0x80);
print("Kyle: Um, hi. Uh, is there any space in the garage for one extra ship?");
if(skipping==0) { sleep(GetSoundLen(ky_Permission)); }
StopKey(Ky, k, 1);
k=-1;
k=PlayKey(Ky, ky_StandThere, 1, 0x0);
MoveToFrame(ISD, 2, 1000);
if(skipping==0) { WaitForStop(ISD); }
PlaySoundThing(cc_Granted, frontConsole, 1, -1, -1, 0x80);
PlaySoundThing(cc_Granted, ISD, 1, -1, -1, 0x80);
print("C&C: Roger that, we've got all the space in the world");
if(skipping==0) { sleep(GetSoundLen(cc_Granted)); }
PlaySoundThing(cc_Prepare, frontConsole, 1, -1, -1, 0x80);
PlaySoundThing(cc_Prepare, ISD, 1, -1, -1, 0x80);
print("C&C: Please surrender control of your vessel to us on my mark.");
if(skipping==0) { sleep(GetSoundLen(cc_Prepare)-1); }
StopKey(Ky, k, 1);
k=-1;
k=PlayKey(Ky, ky_TappingConsole, 1, 0x0);
if(skipping==0) { sleep(2); }
PlaySoundThing(cc_Mark, frontConsole, 1, -1, -1, 0x80);
PlaySoundThing(cc_Mark, ISD, 1, -1, -1, 0x80);
print("C&C: Mark!");
if(skipping==0) { sleep(1); }
PlaySoundThing(confirmClick, frontConsole, 1, -1, -1, 0x80);
PlaySoundThing(confirmClick, ISD, 1, -1, -1, 0x80);
StopKey(Ky, k, 1);
k=-1;
k=PlayKey(Ky, ky_StandThere, 1, 0x0);
if(skipping==0) { sleep(1); }
SetCameraFocus(0, ISDPovCam);
SetCameraFocus(1, ISD);
if(skipping==0) { sleep(1); } Else { sleep(0.1); }
for(i=.01; i<1; i=i+.01)
{
MoveToFrame(ISD, 3, i);
if(skipping==0) sleep(0.01);
AttachThingToThing(ISDPovCam, ISD);
}
MoveToFrame(ISD, 3, 1);
if(skipping==0) { sleep(5); }
SetCameraFocus(0, windowView);
if(skipping==0) { sleep(1); } Else { sleep(0.1); }
if(skipping==0) { PlaySoundLocal(ky_hohum, 1, 0, 0x0); }
print("Hi ho, hi ho, this thing sure turns very slow...");
if(skipping==0) { sleep(GetSoundLen(ky_hohum)); }
StopKey(Ky, k, 1);
k=-1;
k=PlayKey(Ky, ky_TappingConsole, 1, 0x0);
if(skipping==0) { sleep(2); }
SetCameraFocus(0, ISDPovCam);
if(skipping==0) { sleep(40); } Else { sleep(0.1); }
SetCameraFocus(0, windowView);
if(skipping==0) { sleep(2); }
StopKey(Ky, k, 1);
k=-1;
k=PlayKey(Ky, ky_LookingUp, 1, 0x4);
if(skipping==0) { sleep(GetKeyLen(ky_LookingUp)+2); }
SetCameraFocus(0, ISDPovCam);
if(skipping==0) { sleep(2); }
if(skipping==0) { PlaySoundLocal(ky_whoa, 1, 0, 0x0); }
SetThingModel(Ky, ky_WideEyed);
print("Whoa...");
if(skipping==0) { sleep(3); } Else { sleep(0.1); }
SetCameraFocus(0, windowView);
if(skipping==0) { sleep(2); } Else sleep(0.1);
PlaySoundThing(cc_RequestCode, frontConsole, 1, -1, -1, 0x80);
PlaySoundThing(cc_RequestCode, ISD, 1, -1, -1, 0x80);
print("C&C: Scuse me, could you perhaps send the security clearance?");
if(skipping==0) { sleep(GetSoundLen(cc_requestCode)+3); }
PlaySoundThing(cc_RptRequestCode, frontConsole, 1, -1, -1, 0x80);
PlaySoundThing(cc_RptRequestCode, ISD, 1, -1, -1, 0x80);
print("C&C: Hello? Awake? Or are you just gazing att the marvel?");
if(skipping==0) { sleep(2); }
StopKey(Ky, k, 1);
k=-1;
k=PlayKey(Ky, ky_TappingCode, 1, 0x4);
SetThingModel(Ky, ky_Blink);
if(skipping==0) { sleep(1); }
SetThingModel(Ky, ky_WideEyed);
if(skipping==0) { sleep(.5); }
SetThingModel(Ky, ky_Blink);
if(skipping==0) { sleep(.5); }
SetThingModel(Ky, ky_Normal);
PlaySoundThing(ky_sorry, Ky, 1, -1, -1, 0x80);
PlaySoundThing(ky_sorry, ISD, 1, -1, -1, 0x80);
print("Kyle: Uh, sorry... Stand by to recieve.");
for(i=0; i<8; i=i+1)
{
PlaySoundThing(codeClicks, frontConsole, 1, -1, -1, 0x80);
if(skipping==0) { sleep(0.25000000+(rand()*0.50000000)); }
}
PlaySoundThing(confirmClick, frontConsole, 1, -1, -1, 0x80);
if(skipping==0) { sleep(2); }
MoveToFrame(ISD, 3, 100);
if(skipping==0) { WaitForStop(ISD); }
SetCameraFocus(0, ISDPovCam);
StopKey(Ky, k, 1);
k=-1;
k=PlayKey(Ky, ky_StandThere, 1, 0x0);
MoveToFrame(ISD, 4, VectorDist(GetThingPos(ISD), ISDNextToLastFrame)/10.00000000);
if(skipping==0) { sleep(10); } Else { sleep(0.1); }
SetCameraFocus(0, DESTSideCam);
SetCameraFocus(1, DESTHoleCam);
MoveToFrame(ISD, 4, VectorDist(GetThingPos(ISD), ISDNextToLastFrame)/5.00000000);
if(skipping==0) { sleep(10); } Else { sleep(0.1); }
SetThingModel(ISD, smallerISD);
SetCameraFocus(0, DESTHoleCam);
SetCameraFocus(1, ISDPovCam);
if(skipping==0)
{
while(VectorDist(GetThingPos(ISD), ISDNextToLastFrame)>.1)
{
MoveToFrame(ISD, 4, VectorDist(GetThingPos(ISD), ISDNextToLastFrame));
sleep(0.01);
}
}
if(skipping==0) PlaySoundLocal(ky_ThingsBIG, 1, 0, 0x0);
print("This thing's BIG!");
WaitForStop(ISD);
SetPulse(0.01);
if(skipping==0) { sleep(1); }
ChangeSoundPitch(ch4, 0.1, 10);
StopSound(ch4, 10);
if(skipping==0)
{
for(i=0.01; i<1.00; i=i+0.01)
{
MoveToFrame(ISD, 5, i);
if(skipping==0) { sleep(0.01); }
}
}
if(skipping==0)
{
while(VectorDist(GetThingPos(ISD), ISDLastFrame)>.16)
{
MoveToFrame(ISD, 5, 1);
sleep(0.01);
}
}
if(skipping==0)
{
for(i=1.00; i>0.01; i=i-0.01)
{
if(IsMoving(ISD))
{
MoveToFrame(ISD, 5, i);
if(skipping==0) { sleep(0.01); }
}
}
}
WaitForStop(ISD);
AttachThingToThing(ISD, DEST);
ch1=PlaySoundThing(clampOnDock1, ISD, 0, -1, 100, 0x80);
ch2=PlaySoundThing(clampOnDock2, ISD, 0, -1, 100, 0x80);
ch3=PlaySoundThing(clampOnDock3, ISD, 0, -1, 100, 0x80);
ChangeSoundPitch(ch1, .5, 0.05);
ChangeSoundVol(ch1, 1, 0.1);
ChangeSoundPitch(ch2, .1, 0.05);
ChangeSoundVol(ch2, 1, 0.1);
ChangeSoundPitch(ch3, .25, 0.05);
ChangeSoundVol(ch3, 1, 0.1);
if(skipping==0) { sleep(5); }
SetCameraFocus(0, crossCam);
SetCameraFocus(1, crossCam);
if(skipping==0) { sleep(1); }
AISetMoveThing(ST2, ST2_WalkTo);
if(skipping==0) { sleep(1); }
if(skipping==0)
{
while(VectorDist(GetThingPos(ST2), GetThingPos(ST2_WalkTo))>.1)
sleep(0.01);
}
PlaySoundThing(ST2_Problem, ST2, 1, -1, -1, 0x80);
print("STm: Is there a problem?");
if(skipping==0) { sleep(GetSoundLen(ST2_Problem)); }
PlaySoundThing(ST1_DoorsWelded, ST1, 1, -1, -1, 0x80);
print("STfm: Yeah, the door seems to be welded shut.");
if(skipping==0) { sleep(1); }
PlayKey(ST1_KnockDoor, ST1, 1, 0x38);
PlaySoundThing(lockedDoor, ST1, 1, -1, -1, 0x80);
if(skipping==0) { sleep(GetSoundLen(ST1_DoorsWelded)-1); }
PlaySoundThing(ST2_ShouldGetTourch, ST2, 1, -1, 100, 0x80);
print("STm: That's odd... We should probebly get a tourch and burn ourselves in.");
MoveToFrame(crossCam, 1, 1);
if(skipping==0) { sleep(GetSoundLen(ST2_ShouldGetTourch)); }
PlaySoundThing(ST1_YeahYouGo, ST1, 1, -1, 1000, 0x80);
print("STfm: Yeah... You go get it. I'll be standing guard here...");
if(skipping==0) { WaitForStop(crossCam); }
StopKey(Ky, k, 1);
AISetMoveThing(Ky, backElev);
AISetLookPos(Ky, GetThingPos(backElev));
if(skipping==0)
{
for(i=1; i<VectorDist(CrCFrame1, CrCFrame2)*2; i=i+1)
{
MoveToFrame(crossCam, 2, i);
if(skipping==1) { MoveToFrame(crossCam, 2, 100); }
AISetMoveThing(Ky, backElev);
AISetLookPos(Ky, GetThingPos(backElev));
sleep(0.01);
}
while(VectorDist(GetThingPos(crossCam), CrCFrame2)>1)
{
if(skipping==1) { MoveToFrame(crossCam, 2, 100); }
AISetMoveThing(Ky, backElev);
AISetLookPos(Ky, GetThingPos(backElev));
sleep(0.01);
}
for(i=i; i>1; i=i-1)
{
MoveToFrame(crossCam, 2, i);
if(skipping==1) { MoveToFrame(crossCam, 2, 100); }
AISetMoveThing(Ky, backElev);
AISetLookPos(Ky, GetThingPos(backElev));
sleep(0.01);
}
}
else
{
AISetMoveThing(Ky, backElev);
AISetLookPos(Ky, GetThingPos(backElev));
MoveToFrame(crossCam, 2, 100);
}
WaitForStop(crossCam);
AISetMoveThing(Ky, backElev);
AISetLookPos(Ky, GetThingPos(backElev));
while(IsMoving(Ky))
{
if(VectorDist(GetThingPos(Ky), GetThingPos(backDoor))<.30)
{
MoveToFrame(backDoor, 1, 8);
}
sleep(1);
}
MoveToFrame(backDoor, 0, 8);
WaitForStop(backDoor);
SetCameraFocus(0, GetLocalPlayerThing());
SetCameraFocus(1, GetLocalPlayerThing());
ClearActorFlags(GetLocalPlayerThing(), 0x840000);
SendMessage(beginplay, user0);
SendMessage(musicstop, user0);
AutoSaveGame();
return;
activated:
if(GetSenderID()!=3) return;
if(skipping!=0) return;
skipping=1;
print(">>>>SKIPPING>>>>");
j=1;
SetPulse(0.01);
return;
pulse:
if(skipping==1)
{
MoveToFrame(ISD, GetCurFrame(ISD)+1,j);
j=j+1;
AISetMoveThing(Ky, backElev);
AISetLookPos(Ky, GetThingPos(backElev));
}
lv=VectorSub(GetThingPos(DESTHoleCam), GetThingPos(ISD));
lvr=VectorSet(-VectorX(lv), -VectorY(lv), -VectorZ(lv));
SetThingLook(DESTHoleCam, lvr);
return;
end
The SetThingModel is highlighted in red. You'll find it. And please help! Why won't it set new model? Thanks.
/Edward