icecreamassassin Posted August 1, 2011 Share Posted August 1, 2011 (edited) Ok, I'm annoyed, hence why I'm now posting :) I have 10 separate references of a small house boat in various places around Cyrodiil. I have the doors of each reference lead inside a common interior cell (the inside of the boat) The boat starts parked and enabled in one spot. When you go to drive the ship, a menu asks where you wanna go, and you select where to go. The script then enables the destination parent ref (including the doors inside the boat which lead to the correct exterior) and moves the player to the destination ship helm and then disables all the other ship parent references and resets the overall state of the script. problem is that the script doesn't seem to be RE-disabling or enabling the parent refs and their child objects. Here's the code: ScriptName CRboatscript Short button Short controlvar Begin OnActivate if Controlvar == 0 Messagebox "Where would you like to travel?" "Leyawiin" "Draklowe farm" "Imperial City" "Bravil river" "Anvil Bay" "Firid river" "Jerral Mountains" "Lake Arrius" "Fort Rayles" "cancel" set controlvar to 1 else return endif end Begin GameMode if controlvar == 1 set button to getbuttonpressed if button == 0 ;Leyawiin CRB01.enable player.moveto CRleyawiinhelm CRB02.disable CRB03.disable CRB04.disable CRB05.disable CRB06.disable CRB07.disable CRB08.disable CRB09.disable set controlvar to 0 elseif button == 1 ;Draklowe CRB02.enable player.moveto CRdraklowehelm CRB01.disable CRB03.disable CRB04.disable CRB05.disable CRB06.disable CRB07.disable CRB08.disable CRB09.disable set controlvar to 0 elseif button == 2 ;Imperial city CRB03.enable player.moveto CRICwaterfronthelm CRB01.disable CRB02.disable CRB04.disable CRB05.disable CRB06.disable CRB07.disable CRB08.disable CRB09.disable set controlvar to 0 elseif button == 3 ;Bravil river CRB04.enable player.moveto CRbravilhelm CRB01.disable CRB02.disable CRB03.disable CRB05.disable CRB06.disable CRB07.disable CRB08.disable CRB09.disable set controlvar to 0 elseif button == 4 ;Anvil CRB05.enable player.moveto CRanvilhelm CRB01.disable CRB02.disable CRB03.disable CRB04.disable CRB06.disable CRB07.disable CRB08.disable CRB09.disable set controlvar to 0 elseif button == 5 ;Skingrad firid river CRB06.enable player.moveto CRskingradhelm CRB01.disable CRB02.disable CRB03.disable CRB04.disable CRB05.disable CRB07.disable CRB08.disable CRB09.disable set controlvar to 0 elseif button == 6 ;Jerral mts - cloud ruler CRB07.enable player.moveto CRCRThelm CRB01.disable CRB02.disable CRB03.disable CRB04.disable CRB05.disable CRB06.disable CRB08.disable CRB09.disable set controlvar to 0 elseif button == 7 ;lake arrius - cheydenhal area CRB08.enable player.moveto CRarriushelm CRB01.disable CRB02.disable CRB03.disable CRB04.disable CRB05.disable CRB06.disable CRB07.disable CRB09.disable set controlvar to 0 elseif button == 8 ;Fort Rayles - chorral area CRB09.enable player.moveto CRrayleshelm CRB01.disable CRB02.disable CRB03.disable CRB04.disable CRB05.disable CRB06.disable CRB07.disable CRB08.disable set controlvar to 0 elseif button == 9 ;cancel return endif endif end -All child objects are persistent and not initially disabled (though their parent object is which is fine). -The child objects do not have REF ID's other than the doors inside the boat (which are children to the parent objects which are being controlled directly... is it an issue to have child objects with REF ID's?).-Once I use the activator, the new reference items appear but the old ones do not disable again like they should-If I fast travel back to the old REF which SHOULD have been disabled, the boat is still there (but shouldn't be) but the activator no longer functions but the doors still link properly into the interior space-The doors inside the interior continue to spawn, but old doors also remain which really screws things up I am assuming that it is possible to enable and disable a parent ref and it's children multiple times back and forth right? I mean I know it works with direct REF ID control as I have another part of my mod control interchangeable references but it uses REF ID's for ALL objects being controlled. So any clues? Edited August 1, 2011 by icecreamassassin Link to comment Share on other sites More sharing options...
evenstargw Posted August 1, 2011 Share Posted August 1, 2011 Try putting the moveto last, I think it might function as a return, since it sends you to a load screen. Link to comment Share on other sites More sharing options...
icecreamassassin Posted August 1, 2011 Author Share Posted August 1, 2011 Ok well it looks like that fixed the enable/disable problem but the activator is still not working the second time around Link to comment Share on other sites More sharing options...
MShoap13 Posted August 1, 2011 Share Posted August 1, 2011 set button to getbuttonpressed ??? Link to comment Share on other sites More sharing options...
icecreamassassin Posted August 1, 2011 Author Share Posted August 1, 2011 button is a short variable which is assigned to the "Getbuttonpressed" call, the value of which is determined by the message box selections. The first item is 0, the second is 1, the third is 2, etc. it's just faster to write "button" in the script instead of using "getbuttonpressed" every time Link to comment Share on other sites More sharing options...
icecreamassassin Posted August 1, 2011 Author Share Posted August 1, 2011 So I figured it out. I had an extra elseis return terminator in the onactivate portion which didn't need to be there. Thanks evenstargw for your help with the ordering, that fixed it all and it works perfectly, now on to changing the region borders a little... :) Link to comment Share on other sites More sharing options...
evenstargw Posted August 2, 2011 Share Posted August 2, 2011 You're welcome. Good luck on your modding adventures. Link to comment Share on other sites More sharing options...
Recommended Posts