icecreamassassin Posted August 5, 2011 Share Posted August 5, 2011 ok... So I have this script, for some reason it was working in one form I tried but in changing some other things around I somehow forgot in which state it worked and now I;m trying to figure it all out. Basically I have an object that you pick up in game, it disables some REFs and displays a message (which will eventually be a quest progression) and you go to a certain interior cell and it runs the code again, checking the condition that you are in the cell and have the item, and if it's true on both, it disables some REFs and enables some others and displays a messagebox again. BUT whenever I walk into the cell the game removes the item and them immediately CTD. I thought that it was because it's an object script and that to remove the object from your inventory during the script causes the script to bomb out because the object running it no longer exists in play... BUT I use an almost identical script elsewhere in my mod which does the same check for item and incell conditions called from the object which is then removed during the script. So I am at a loss. ScriptName CRsteampartsscript begin GameMode if player.getincell bravilhouseboat == 1 if player.getitemcount CRsteamparts5 == 1 CRboatboilerfire.enable CRboatboiler.enable crboatsmoke2.enable crboatengine.enable crboatsmoke1.enable crboatlever.enable CRboatwheel1.enable crboatwheel2.enable messagebox "You install the parts needed to restore the boat house to working order. The controls on deck will allow you to pilot the boat" player.removeitem CRsteamparts5 1 endif endif end Begin OnAdd Player messagebox "These are the parts needed to get the boat house in Bravil back up and running." CRsteamparts1.disable CRsteamparts2.disable CRsteamparts3.disable end Link to comment Share on other sites More sharing options...
fg109 Posted August 5, 2011 Share Posted August 5, 2011 I've had a problem like that before too. I don't know the cause of it, but it was fine when I changed from using RemoveItem to RemoveMe. Link to comment Share on other sites More sharing options...
Hickory Posted August 5, 2011 Share Posted August 5, 2011 ok... So I have this script, for some reason it was working in one form I tried but in changing some other things around I somehow forgot in which state it worked and now I;m trying to figure it all out. Basically I have an object that you pick up in game, it disables some REFs and displays a message (which will eventually be a quest progression) and you go to a certain interior cell and it runs the code again, checking the condition that you are in the cell and have the item, and if it's true on both, it disables some REFs and enables some others and displays a messagebox again. BUT whenever I walk into the cell the game removes the item and them immediately CTD. I thought that it was because it's an object script and that to remove the object from your inventory during the script causes the script to bomb out because the object running it no longer exists in play... BUT I use an almost identical script elsewhere in my mod which does the same check for item and incell conditions called from the object which is then removed during the script. So I am at a loss. ScriptName CRsteampartsscript begin GameMode end Begin OnAdd Player end Have you tried placing the OnAdd block before the GameMode block? I don't know the innards of your mod but Begin blocks run in the order that they are placed in the script. Link to comment Share on other sites More sharing options...
icecreamassassin Posted August 5, 2011 Author Share Posted August 5, 2011 (edited) I have run the script with the begin blocks reversed, but it doesn't solve the problem. I did find a work around though. I set up the bones of the quest journal and merely had the quest stage for finding the item trigger one stage, then have the stage after that be triggered by a conversation topic which will be put in place and that stage will execute the enabling of the new equipment of which the activator to relocate the boat will basically enable the new destination refs and the quest will be progressed which will disable the old originals. I tested it out and it all works flawlessly now. so basically you buy the boat (quest start) find info on who to talk to (quest stage +1) talk to the person (quest stage +2) find the parts needed (quest stage +3) return the parts to the NPC which sets up the new equipment (quest stage +4) go and hit the switch on the boat which enables the new REF out in the river outside bravil and disables the old REF in town (quest stage +5) then you just hit the switch and tell the menu where you wanna go and it basically enables the new one, disables the old one and moves you to the new ref, just like the boat were moving (this of course toggles the boat interior doors to lead you to the correct ref location of where the boat currently is docked. Edited August 5, 2011 by icecreamassassin Link to comment Share on other sites More sharing options...
Hickory Posted August 5, 2011 Share Posted August 5, 2011 Cool. I'm glad you got it sorted. Link to comment Share on other sites More sharing options...
Recommended Posts