Arthmoor Posted June 4, 2008 Share Posted June 4, 2008 EDIT: Figured it out. MQ14StatueScript needed to call on MartinRef.OCCPlayerStatue instead of trying to manipulate PlayerStatue twice. Ok. I'm pretty much stumped. I've got a scripting issue I can't quite nail down with the player's Bruma statue. I'm trying to get it placed properly in Open Cities after the Defense of Bruma quest but instead of the expected stone statue, I'm somehow generating two full color duplicates of the player on top of the statue stand at the north gate. I don't really get why, so I'll post the modified scripts. ScriptName MartinScript ref playerStatue ref OCCplayerStatue short scriptKill ; set to 1 if a script killed Martin, for debugging problems begin OnLoad if getstage MQ14 >= 50 && MQ14.createStatue == 0 set MQ14.createStatue to 1 MQ14PlayerStatueMarker.enable set playerStatue to player.CreateFullActorCopy playerStatue.removeItem torch02 1000; make sure the statue doesn't have a torch playerStatue.addscriptpackage MQStatuePose playerStatue.moveto MQ14PlayerStatueMarker ; set playerStatue to MQ14PlayerStatueMarker.placeatme 7 playerStatue.setalert 1 playerStatue.setghost 1 playerStatue.setunconscious 1 playerStatue.setdestroyed 1; so you can't activate player playerStatue.setscale 1.8 playerStatue.setav speed 0; so you can't move it around ; Now we copy the statue for Open Cites set OCCplayerStatue to player.CreateFullActorCopy OCCplayerStatue.removeItem torch02 1000; make sure the statue doesn't have a torch OCCplayerStatue.addscriptpackage MQStatuePose OCCplayerStatue.moveto OCCMQ14PlayerStatueMarker ; set OCCplayerStatue to OCCMQ14PlayerStatueMarker.placeatme 7 OCCplayerStatue.setalert 1 OCCplayerStatue.setghost 1 OCCplayerStatue.setunconscious 1 OCCplayerStatue.setdestroyed 1; so you can't activate player OCCplayerStatue.setscale 1.8 OCCplayerStatue.setav speed 0; so you can't move it around endif end begin OnDeath EssentialDeathReload "Martin has been slain. All hope is now lost." end begin OnHit if getstage MQ16 == 30 stopcombat scaonactor endif end begin OnStartCombat MehrunesDagonRef ; Martin never attacks Dagon stopcombat end begin OnPackageDone MQ12MartinPlaceWelkyndStone MQRitualWelkyndRef.enable set MQ12.placeStone to 1 end begin OnPackageDone MQ14MartinPlaceSigilStone MQRitualSigilRef.enable set MQ14.placeStone to 1 end ; when Martin reaches battle speech position, set stage begin OnPackageChange MQ13MartinStartBattleSpeech setstage MQ13 41 end ; when Martin reaches exterior of Bruma, trigger troops to start following begin OnPackageDone MQ13MartinBrumaToExterior setstage MQ13 32 end ; when Martin reaches chapel steps marker, set stage begin OnPackageDone MQ13MartinChapelSteps setstage MQ13 31 end ; headtracking during battle speech begin OnPackageStart MQ13MartinBattleSpeechTravel3 look MQ13MartinBattleMarkerLeft end begin OnPackageStart MQ13MartinBattleSpeechTravel2 look MQ13MartinBattleMarkerRight end begin OnPackageStart MQ13MartinToBattlePosition stoplook end begin OnPackageDone MQ15MartinOpenPortal MQRitualDrawingRef.activate MartinRef 1 end ; when Martin reaches the exterior of the Elder Council, set stage 8 begin OnPackageEnd MQ16MartinFollowPCToPalace setstage MQ16 8 end ; when Martin reaches Temple wait marker begin OnPackageDone MQ16MartinToTempleWaitMarker setstage MQ16 45 end ; when Martin reaches the Temple altar marker begin OnPackageDone MQ16MartinLightDragonfires setstage MQ16 50 end scn MQ14StatueScript short statueYear ref playerStatue ref OCCplayerStatue short distancecheck Short DoOnce begin OnLoad if playerStatue == 0 set playerStatue to MartinRef.playerStatue set OCCplayerStatue to MartinRef.playerStatue endif if playerStatue != 0 set statueYear to MQ14.victoryYear playerStatue.moveto MQ14PlayerStatueMarker playerStatue.addscriptpackage MQStatuePose; shouldn't be necessary but oh well playerStatue.pms effectstone playerStatue.pickidle OCCplayerStatue.moveto OCCMQ14PlayerStatueMarker OCCplayerStatue.addscriptpackage MQStatuePose; shouldn't be necessary but oh well OCCplayerStatue.pms effectstone OCCplayerStatue.pickidle if DoOnce == 0 set DoOnce to 1 playerStatue.AddSpell OCCStatueRegen playerStatue.RemoveSpell VampDisease playerStatue.RemoveSpell Vampirism25 playerStatue.RemoveSpell Vampirism50 playerStatue.RemoveSpell Vampirism75 playerStatue.RemoveSpell Vampirism100 OCCplayerStatue.AddSpell OCCStatueRegen OCCplayerStatue.RemoveSpell VampDisease OCCplayerStatue.RemoveSpell Vampirism25 OCCplayerStatue.RemoveSpell Vampirism50 OCCplayerStatue.RemoveSpell Vampirism75 OCCplayerStatue.RemoveSpell Vampirism100 endif endif end begin OnActivate if IsActionRef player == 1 MessageBox "The Savior of Bruma. Singlehandedly fought off the hordes of Oblivion, entered their Great Gate and cast down the dread Siege Machine in ruin. Erected by the Grateful Citizens of Bruma, 3E %.0f.", statueYear endif end begin gamemode ; we need to pick idle whenever the player gets close (real problem is switching process levels, but this will have to fake it) if distancecheck == 0 if getdistance player <= 2100 set distancecheck to 1 OCCplayerStatue.pickidle endif endif if distancecheck == 1 if getdistance player > 2100 set distancecheck to 0 endif endif end If anyone can spot a problem here and lend a hand, I'd appreciate it. This issue is holding up my next update release. Link to comment Share on other sites More sharing options...
GBHis Posted June 6, 2008 Share Posted June 6, 2008 A bit too tired to read through the script, sorry. I remember writing my own script that mimicked the statue script. You need to create a fullactorcopy() of the player, turn off the AI, then add a *shader* to it (either using your own stone texture or an existing one). If the script keeps troubling you, I have my version lying around somewhere... Link to comment Share on other sites More sharing options...
Vagrant0 Posted June 6, 2008 Share Posted June 6, 2008 Forgive me for underthinking this, but why not just change it so that the normal statue gets moved to your marker, instead of the normal one playerStatue.moveto MQ14PlayerStatueMarker and just not make a new statue at all. Link to comment Share on other sites More sharing options...
Arthmoor Posted June 7, 2008 Author Share Posted June 7, 2008 @GBHis: if playerStatue == 0 set playerStatue to MartinRef.playerStatue set OCCplayerStatue to MartinRef.playerStatue endif That block right there was what I broke. I've since fixed it as such: if playerStatue == 0 set playerStatue to MartinRef.playerStatue set OCCplayerStatue to MartinRef.OCCplayerStatue endif and now both statues work as expected. @Vagrant0: I make one copy for the standard worldspace, and one copy for the Tamriel worldspace. This way if the user uninstalls the mod for some reason, they'll still have their proper statue in the proper location. Creating just the copy in Tamriel would cause the vanilla one to be missing later. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.