Gar... I wrote and re-wrote this cog, and I have no clue what I'm doing wrong. It's all basic stuff here, just quite a bit of it, and when I write this much code in a sitting there are always chances for mistakes that I cannot identify.
When I enter the specified sector in-game, the game simply crashed without wrning and kicks me back to Windows.
When I enter the specified sector in-game, the game simply crashed without wrning and kicks me back to Windows.
Code:
# # RITES OF XANTHUS TOTAL CONVERSION # # A new cutscene for the execution of Tahben's father. # # Whew, this is big. :] # # -Lord_Grismath # # NOTE: Cross Check ALL COG COMMANDS at Home. # symbols message startup message entered template tahben template orcarmy thing flycam // Flycam for the approach to the camp thing guillocam // Camera on executioner thing guillocam2 // Camera at Guillotine, shifts to basket thing orcexec // Orcish executioner thing tahdummy // Tahben Dummy (Sword Actor) thing father // Guillotine with Tahben's Father thing rope // Rope for the Guillotine thing orc1 // Orc camp guards thing orc2 thing orc3 thing orc4 thing tower thing orcspawn1 thing orcspawn2 thing tahteleport // 16 things, I just hope this isn't too many :[] int killed=0 local int played=0 local sound music sound music2 sound tahtofather sound guillotine sound toolate sound fathershout sound nooo sound crash // the tower falling sound charge // orc reinforcements sector entersect int status=0 local int breathingkey local int chopkey local thing enemy0 local thing enemy1 local thing enemy2 local thing enemy3 local thing enemy4 local thing enemy5 local thing enemy6 local thing enemy7 local thing enemy8 local thing enemy9 local thing tahactor local thing player local end # ======================================================================================== code startup: player = GetLocalPlayerThing(); breathingkey = playkey(father, breathing, 1, 0x0); Return; entered: if(GetSenderRef() == entersect) { if(status == 0) { jkBeginCutscene(); player = GetLocalPlayerThing(); SetActorFlags(player, 0xa00000); StopThing(player); tahactor = CreateThing(tahben,tahdummy); SetCameraFocus(0, flycam); SetCurrentCamera(0); PlaySoundLocal(music, 1, 0.0, 0x00); Sleep(1); MoveToFrame(flycam,1,3); WaitForStop(flycam); MoveToFrame(flycam,2,3); WaitForStop(flycam); MoveToFrame(flycam,3,3); WaitForStop(flycam); SetCameraFocus(0, guillocam); SetCurrentCamera(0); Sleep(1); MoveToFrame(tahactor, 1, 2); Sleep(1); SetCameraFocus(0, flycam); SetCurrentCamera(0); MoveToFrame(flycam,4,3); WaitForStop(flycam); print("Tahben: Father! Fear not; I shall rescue thee!"); PlaySoundLocal(tahtofather, 1, 0.0, 0x00); Sleep(1); SetCameraFocus(0, guillocam2); SetCurrentCamera(0); AISetLookFrame(orcexec, 1); print("Orc: It is too late to save him, man!"); PlaySoundLocal(toolate, 1, 0.0, 0x00); Sleep(2); AISetLookFrame(orcexec, 0); AISetFireTarget(orcexec, rope); DestroyThing(rope); Sleep(1); SetCameraFocus(0, guillocam); SetCurrentCamera(0); Sleep(1); StopKey(father, breathingkey, 2.0); chopkey = playkey(father, chop, 1, 0x14); PlaySoundLocal(fathershout, 1, 0.0, 0x00); Sleep(2); SetCameraFocus(0, flycam); SetCurrentCamera(0); print("Tabhen: NOOO!"); PlaySoundLocal(nooo, 1, 0.0, 0x00); Sleep(2); PlaySoundLocal(music2, 1, 0.0, 0x00); MoveToFrame(flycam, 5, 3); // Now for Tahben's vengeance... MoveToFrame(tahactor, 2, 1); WaitForStop(tahactor); MoveToFrame(guillocam, 1, 3); AISetFireTarget(tahactor, tower); AISetFireTarget(tahactor, tower); MoveToFrame(orc1, 1, 2); MoveToFrame(tahactor, 3, 2); WaitForStop(tahactor); // The tower falls, killing one of the orcs SetCameraFocus(0, guillocam); SetCurrentCamera(0); MoveToFrame(flycam, 6, 3); MoveToFrame(tower, 1, 3); WaitForStop(tower); PlaySoundLocal(crash, 1, 0.0, 0x00); SetPOVShake('0.0 -.003 0.0', '1.0 0.0 0.0', .05, 30.0); SetPOVShake('0.0 +.003 0.0', '-1.0 0.0 0.0', .05, 30.0); SetPOVShake('0.0 -.003 0.0', '1.0 0.0 0.0', .05, 30.0); SetCameraFocus(0, flycam); SetCurrentCamera(0); PlaySoundLocal(music2, 1, 0.0, 0x00); DamageThing(orc1, 900, 0x40, tower); Sleep(2); MoveToFrame(flycam, 7, 3); AIMoveThing(tahactor, orc2); AIFireTarget(tahactor, orc2); DamageThing(orc2, 900, 0x10, tahactor); MoveToFrame(flycam, 8, 3); AISetMode(Orc3, 0x800); AISetMode(Orc4, 0x800); MoveToFrame(tahactor, 3, 2); WaitForStop(tahactor); MoveToFrame(flycam, 9, 3); WaitForStop(flycam); Sleep(2); TeleportThing(player, tahteleport); jkEndCutscene(); SetCameraFocus(0, player); ClearActorFlags(player, 0xa00000); playsoundlocal(charge, 1, -1, 0x0); enemy0=CreateThing(orcarmy, orcspawn1); AISetMoveThing(enemy0, player); Sleep(0.2); enemy1=CreateThing(orcarmy, orcspawn1); AISetMoveThing(enemy1, player); Sleep(0.2); enemy2=CreateThing(orcarmy, orcspawn1); AISetMoveThing(enemy2, player); Sleep(0.2); enemy3=CreateThing(orcarmy, orcspawn1); AISetMoveThing(enemy3, player); Sleep(0.2); enemy4=CreateThing(orcarmy, orcspawn1); AISetMoveThing(enemy4, player); Sleep(0.2); enemy5=CreateThing(orcarmy, orcspawn2); AISetMoveThing(enemy5, player); Sleep(0.2); enemy6=CreateThing(orcarmy, orcspawn2); AISetMoveThing(enemy6, player); Sleep(0.2); enemy7=CreateThing(orcarmy, orcspawn2); AISetMoveThing(enemy7, player); Sleep(0.2); enemy8=CreateThing(orcarmy, orcspawn2); AISetMoveThing(enemy8, player); Sleep(0.2); enemy9=CreateThing(orcarmy, orcspawn2); AISetMoveThing(enemy9, player); status = 1; } else { return; } } return; end