Hi!
This COG was made for a Noob. He asked me to make some fancy stuff for him, and I sent him a copy of this before I tested it. Now, the problem is that, when I'm going to test the game, the loading freezes at 95%. It worked before I added the extra sound open and yikes. I tried to // the PlaySounds out, but that didn't work. Do I have all objects? Lets see:
cam=65, exists
pivot=66, exists
light=67, exists
land=19 0, exists
water=19 12, exists
brick=brick.mat, exists
close=forcepull01.wav, exists
open=forcespeed01.wav, exists
yikes=i00ky105.wav, exists
All is there, what's wrong?
/Edward
Code:
#Level master COG #Generated by JED 0.951 beta # Edited by Edward symbols message startup message timer message entered thing cam thing pivot thing light surface land surface water material brick sound close sound open sound yikes int player local end code startup: // Register COG as master COG SetMasterCOG(GetSelfCOG()); player = GetLocalPlayerThing(); // Initialise Goals // Give player weapons and ammo SetInv(player, 1, 1); // fists SetInv(player, 3, 1); // ST Rifle SetInv(player, 4, 1); // TD // Initialize weapon. SetFireWait(player, -1); SetMountWait(player, 0); SetCurInvWeapon(player, 0); SelectWeapon(player, AutoSelectWeapon(player, 1)); SetTimer(15); SetActorFlags(player,0xA00000); // Freeze player AttachThingToThing(cam,pivot); // Attach cam to pivot so when pivot moves, cam will follow SetCameraFocus(0,cam); // Make camera see through cam SetCurrentCamera(0); // Make sure it is internal camera sleep(0.1); // PlaySoundThing(open,light,1,-1,10,0x80); // Play opening sound SetThingLight(light,1,1); // And add light. Rotate(pivot,'0 20 0'); // Make the pivot thing rotate at 20° per second on the yaw axis Rotate(cam,'10 20 0'); // Do the same with cam and add a little pitch so it looks down on the player. sleep(3.5); StopThing(pivot); // Stop them after 3.5. StopThing(cam); // That way we have turned the pivot 70°, and pitched down 15° return; timer: // Force ranking SetInv(player, 20, 0); SetInv(player, 14, 4*50); jkSyncForcePowers(); Return; entered: if(GetSenderRef()!=land) return; // Entered isn't only for sectors, it also is used for when you land on a surface. Touch with you feet. // PlaySoundThing(yikes,player,1,-1,10,0x80); // A little yikes from kyle. sleep(1); SetSurfaceMat(water,brick); // Take away the water effect SetThingLight(light,0,0.25); // Turn off lights PlaySoundThing(close,light,1,-1,10,0x80); // Close portal sound sleep(1); ClearFaceType(water,0x2); // Clear translucency SetCameraFocus(0,player); // Return camera to player ClearActorFlags(player,0xA00000); // Unfreeze player return; end
This COG was made for a Noob. He asked me to make some fancy stuff for him, and I sent him a copy of this before I tested it. Now, the problem is that, when I'm going to test the game, the loading freezes at 95%. It worked before I added the extra sound open and yikes. I tried to // the PlaySounds out, but that didn't work. Do I have all objects? Lets see:
cam=65, exists
pivot=66, exists
light=67, exists
land=19 0, exists
water=19 12, exists
brick=brick.mat, exists
close=forcepull01.wav, exists
open=forcespeed01.wav, exists
yikes=i00ky105.wav, exists
All is there, what's wrong?
/Edward