drake127 Posted March 22, 2007 Share Posted March 22, 2007 Classic bug when player save and load during script execution. I believe bug is in following code (ar0801.bcs). IF Global("Coffin3","AR0801",2) GlobalLT("LassalVampires","GLOBAL",3) THEN RESPONSE #100 SetInterrupt(FALSE) SetGlobal("LassalVampires","GLOBAL",3) AddexperienceParty(9000) TakePartyItem("misc6w") DestroyItem("misc6w") CreateVisualEffectObject("SPDEATH3","Coffin3") Wait(1) CreateVisualEffectObject("SPFLESH2","Coffin3") CreateVisualEffect("SPCLOUD3",[480.1338]) Wait(1) CreateVisualEffect("SPFLESHS",[480.1338]) Wait(1) // If I save and load here, Bodhi won't appear and game is broken. CreateCreatureDoor("bodhi2",[480.1338],14) Wait(3) ActionOverride("bodhi2",StartDialogueNoSet(Player1)) SetInterrupt(TRUE) END Link to comment
Smoketest Posted March 22, 2007 Share Posted March 22, 2007 In my experience, variables should not be set in such code blocks until AFTER the creature is created, but before any dialog begins. It might be a good idea to set the variable in dialog as well, in case the save takes place before the dialog can be initiated. Link to comment
drake127 Posted March 23, 2007 Author Share Posted March 23, 2007 I think block should be splitted to several parts. In first one you stab coffin (gain XP and lose stake), in second one Bodhi is spawned and in third one Bodhi starts to talk. Since script has to be rebuilded, I'd choose to rebuild it completely and avoid modifying dialog file. You cannot simply move that variable at the end because you'd keep gaining XP until you ran out of stakes. I made a new local variable that follows Bodhi's creation progress. Only thing I am not sure of is role of SetInterrupt statement. Can somebody tell me if it has any impact on following code? If somebody wonders why is Wait(3) at the end of second block, it is because of door animation. There is actually no delay between Bodhi's appearance and dialog. IF Global("Coffin3","AR0801",2) GlobalLT("LassalVampires","GLOBAL",3) THEN RESPONSE #100 SetInterrupt(FALSE) AddexperienceParty(9000) TakePartyItem("misc6w") DestroyItem("misc6w") SetGlobal("LassalVampires","GLOBAL",3) SetGlobal("d_BodhiSpawn","AR0801",1) CreateVisualEffectObject("SPDEATH3","Coffin3") Wait(1) CreateVisualEffectObject("SPFLESH2","Coffin3") SetInterrupt(TRUE) END IF Global("d_BodhiSpawn","AR0801",1) THEN RESPONSE #100 SetInterrupt(FALSE) CreateVisualEffect("SPCLOUD3",[480.1338]) Wait(1) CreateVisualEffect("SPFLESHS",[480.1338]) Wait(1) CreateCreatureDoor("bodhi2",[480.1338],14) SetGlobal("d_BodhiSpawn","AR0801",2) Wait(3) SetInterrupt(TRUE) END IF Global("d_BodhiSpawn","AR0801",2) THEN RESPONSE #100 SetInterrupt(FALSE) ActionOverride("bodhi2",StartDialogueNoSet(Player1)) SetGlobal("d_BodhiSpawn","AR0801",3) SetInterrupt(TRUE) END Link to comment
Smoketest Posted March 23, 2007 Share Posted March 23, 2007 In retrospect, SetCutSceneLite(TRUE/FALSE) would probably be a better solution. This is a special sequence in the game that I feel shouldn't be interruptible by the player. SetCutSceneLite enables/disables a lighter version of cutscene mode that prevents the player from messing with the interface but allows scripts to continue running in the background. Link to comment
drake127 Posted March 24, 2007 Author Share Posted March 24, 2007 In retrospect, SetCutSceneLite(TRUE/FALSE) would probably be a better solution. This is a special sequence in the game that I feel shouldn't be interruptible by the player. SetCutSceneLite enables/disables a lighter version of cutscene mode that prevents the player from messing with the interface but allows scripts to continue running in the background.Agreed, works fine. (GUI disappears, save is not possible, it fits situation). Link to comment
CamDawg Posted March 26, 2007 Share Posted March 26, 2007 Added to beta fixes for the next version: // bodhi's spawning should be uninterruptible COPY_EXISTING ~ar0801.bcs~ ~override~ DECOMPILE_BCS_TO_BAF REPLACE_TEXTUALLY ~SetInterrupt(FALSE)~ ~SetCutSceneLite(TRUE)~ REPLACE_TEXTUALLY ~SetInterrupt(TRUE)~ ~SetCutSceneLite(FALSE)~ COMPILE_BAF_TO_BCS BUT_ONLY_IF_IT_CHANGES Link to comment
devSin Posted March 26, 2007 Share Posted March 26, 2007 Is CutsceneLite in the SoA IDS files, or was there only CursorState (or neither)? Link to comment
CamDawg Posted March 26, 2007 Share Posted March 26, 2007 I don't like it when you post in this forum, as it invariably means we've screwed up something. I still like the cutscene idea; all we need is to add a CutSceneID. Link to comment
devSin Posted March 26, 2007 Share Posted March 26, 2007 Whatever for? Cutscene ID outside an actual cutscene script is completely pointless? I posted because I really don't know that the action exists in non-ToB installs (I think the cursor state action, which is the exact same thing, may exist, but who knows?). Cutscene mode will suck unless you're willing to MoveViewPoint([480.1338],0). For a true fix, it may just be better to move the variables (this is a problem everywhere Wait() is used, and I'm not sure adding cutscenes left and right is really that kosher)? Link to comment
drake127 Posted March 26, 2007 Author Share Posted March 26, 2007 I've just tested it - SetCutSceneLite is not implemented in SoA. Even adding action to action.ids doesn't make it work. Link to comment
CamDawg Posted April 13, 2007 Share Posted April 13, 2007 How's this work for everyone? It moves the SetGlobal to immediately prior to Bodhi's spawning. If the game is saved and reloaded prior to Bodhi's appearance, it'll go through the sequence again and try to spawn her. // bodhi broken if saved during her wait()-laden spawn COPY_EXISTING ~ar0801.bcs~ ~override~ DECOMPILE_BCS_TO_BAF REPLACE_TEXTUALLY ~SetGlobal("LassalVampires","GLOBAL",3)~ ~~ REPLACE_TEXTUALLY ~CreateCreatureDoor("bodhi2",[480.1338],14)~ ~SetGlobal("LassalVampires","GLOBAL",3) CreateCreatureDoor("bodhi2",[480.1338],14)~ COMPILE_BAF_TO_BCS BUT_ONLY_IF_IT_CHANGES Link to comment
Nythrun Posted April 13, 2007 Share Posted April 13, 2007 Wanna REPLACE_TEXTUALLY EXACT_MATCH so you don't have to escape those brackets? Link to comment
Nythrun Posted April 13, 2007 Share Posted April 13, 2007 REPLACE_TEXTUALLY ~CreateCreatureDoor("bodhi2",\[480\.1338\],14)~ also acceptible... Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.