Agnot2006 Posted June 16, 2009 Share Posted June 16, 2009 I am not very good at scripting as I don’t do it that much.I have some spare time at work, but cannot try anything until I get home.I have created some Idle Dance markers which I have placed around my cell and work fine. What I am hoping the script will do is enable them after 6pm and disable at midnight.Is this possible with Idle markers and do I need to initially set the marker to disabled in its tick box? scn DisableAImarkerScript short Toggle begin gamemode if gamehour >= 0 && Gamehour <= 18 && Toggle=1 aaAIdanceMarke.disableSet Toggle to 0 elseifgamehour > 18 && Toggle=0aaAIdanceMarke.enable Set Toggle to 1endif end Link to comment Share on other sites More sharing options...
Agnot2006 Posted June 16, 2009 Author Share Posted June 16, 2009 I just thought I needed to set the Toggle first so have amended the script.Will this work? scn DisableAImarkerScript short Toggleshort Dofirst begin gamemode if gamehour >= 0 && Gamehour <= 18 && Dofirst=0Set Toggle to 1EndifSet Dofirst to 1 end begin gamemode if gamehour >= 0 && Gamehour <= 18 && Toggle=1 aaAIdanceMarke.disableSet Toggle to 0 elseifgamehour > 18 && Toggle=0aaAIdanceMarke.enable Set Toggle to 1endif end Link to comment Share on other sites More sharing options...
BadPenney Posted June 16, 2009 Share Posted June 16, 2009 Idle markers don't need to be enabled and disabled. Just make a sandbox AI package that uses idle markers on the schedule that you want. Link to comment Share on other sites More sharing options...
Agnot2006 Posted June 16, 2009 Author Share Posted June 16, 2009 I want to have idles markers placed so that there are no changes to any vanilla NPC’s or sandboxes but will be used by them at certain times. For instance when a Radio timer comes on dance Idles will also be activated etc. Its just something I am looking at if its at all possible. So a visiting companion etc will also use without any changesRRCompanionVault.esm does it with trigger boxes I just thought it could be done with markers? Link to comment Share on other sites More sharing options...
BadPenney Posted June 16, 2009 Share Posted June 16, 2009 I want to have idles markers placed so that there are no changes to any vanilla NPC’s or sandboxes but will be used by them at certain times. For instance when a Radio timer comes on dance Idles will also be activated etc. Its just something I am looking at if its at all possible. So a visiting companion etc will also use without any changesRRCompanionVault.esm does it with trigger boxes I just thought it could be done with markers?Give it a try and see what happens. "Make mistakes, there's nothing wrong with trying." ~ Paul Hewson (a.k.a. Bono) Link to comment Share on other sites More sharing options...
Agnot2006 Posted June 22, 2009 Author Share Posted June 22, 2009 I am trying to develop the script whilst learning at the same time. My script has changed as Geck keeps telling me to put things right and I keep changing until the error goes awayThis is the latest version scn DisableAidleProjectorScript short Toggleshort Dofirst begin gamemode if Dofirst==0 If gamehour >= 0 &&gamehour <=18 Set Toggle to 1 endif endif Set Dofirst to 1 end begin gamemode if gamehour >= 0 && Gamehour <= 18 && Toggle==1 aaSpringValePosingMarker.disable aaSpringValeprojectorLight2.disable aaaSpringValeProjectorLightFX01.disable Set Toggle to 0 endif If gamehour > 18 && Toggle=0 aaSpringValePosingMarker.enable aaSpringValeprojectorLight2.enable aaaSpringValeProjectorLightFX01.enable Set Toggle to 1 endif end My problem now is the error: Script 'DisableAidleProjectorScript', Line 18Syntax error. Invalid reference 'aaSpringValePosingmarker' (only references and reference variables are allowed in this context) I have gotten completely lost now. Can anyone please help? Link to comment Share on other sites More sharing options...
Agnot2006 Posted July 4, 2009 Author Share Posted July 4, 2009 I only got it to work!! After looking at every script on this site (thank you all) and some encouragement thank you BadPenneyThe scrip now turns on the projector light, an extra effect light and a Dance marker that I set up to use one of Umpa’s Dance idles after 18:00 and turns it all off again after midnight. The NPC’s in the area use the marker when its activated as part of the normal sandbox. The only fly in the ointment at the moment is an NPC can continue dancing for a while after de-activation, I am still looking at that.It didn’t work until I added the script to the extra effect light which was the only one that had a script dropdown list, and then everything worked fineFor anyone that’s interested and maybe help tidy up the script her it is. scn DisableAidleProjectorScript short SBToggleshort Dofirst begin gamemode if Dofirst==0 If gamehour >= 0 && gamehour <=18 Set SBToggle to 1 endif endif Set Dofirst to 1 end begin gamemode if gamehour >= 0 && Gamehour <= 18 && SBToggle==1 PosingMarkerDanceREF.disable FSPlightBulbSBREF.disable FSPlightREF.disable aadanceMarkerSB01REF.disable Set SBToggle to 0 endif If gamehour > 18 && SBToggle==0 PosingMarkerDanceREF.enable FSPlightBulbSBREF.enable FSPlightREF.enable aadanceMarkerSB01REF.enable Set SBToggle to 1 endif end Link to comment Share on other sites More sharing options...
BadPenney Posted July 4, 2009 Share Posted July 4, 2009 If you always have the same NPC continue to dance after the dance idle is disabled, then it might help to include an evaluate package command in a script. i.e. "NPCnameREF.evp" That should get them to recheck their script package and do something more appropriate. ResetAI can be useful for that too. Link to comment Share on other sites More sharing options...
Agnot2006 Posted July 5, 2009 Author Share Posted July 5, 2009 I'm not so sure now that the Markers are turning off as they should do, or if the game is just remembering that they are there. All the physical bits are being removed, but I had an NPC start Dancing before they were turned on! Its a problem with waiting for an NPC to use or not. Link to comment Share on other sites More sharing options...
Recommended Posts