Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Duck

Allies
  • Posts

    5
  • Joined

  • Last visited

Posts posted by Duck

  1. Hi I am new to scripting and having a friend to help me with a few of my scripts so far, but i am not sure how to actully cause a button to enable, lets say a npc that is already there, than when the button is pressed again the npc vanishes and so forth, it is for a player house i am working on and so if a room gets to full of npcs the floor can vanish and or flame traps to be enabled and burn the npcs alive

     

    Well made the script i was waiting took a while looking at different scripts but this is what i came up with

     

    Event OnActivate(ObjectReference akActivator) ; Function to change bard to enabled or disabled
        If (Bard1.IsDisabled()) ; if parent marker is disabled
            Bard1.Enable() ; enable bard
        Else
            Bard1.Disable() ; disable bard
        EndIf
    EndEvent



    Actor Property Bard1  Auto

     

     

    Than for my fire traps i made this one

     

    criptname DuckEnableScript2 extends Form  


    Event OnActivate(ObjectReference akActivator) ; Function to change Traps to enabled or disabled
        If (Trap1.IsDisabled()) ; if Trap1 is disabled
            Trap1.Enable() ; enable Trap1
        Else
            Trap1.Disable() ; disable Trap1
        EndIf
        
        If (Trap2.IsDisabled()) ; if Trap2 is disabled
            Trap2.Enable() ; enable Trap2
        Else
            Trap2.Disable() ; disable Trap2
        EndIf

        If (Trap3.IsDisabled()) ; if Trap3 is disabled
            Trap3.Enable() ; enable Trap3
        Else
            Trap3.Disable() ; disable Trap3
        EndIf
        
        If (Trap4.IsDisabled()) ; if Trap4 is disabled
            Trap4.Enable() ; enable Trap4
        Else
            Trap4.Disable() ; disable Trap4
        EndIf
        
        If (Trap5.IsDisabled()) ; if Trap5 is disabled
            Trap5.Enable() ; enable Trap5
        Else
            Trap5.Disable() ; disable Trap5
        EndIf

        If (Trap6.IsDisabled()) ; if Trap6 is disabled
            Trap6.Enable() ; enable Trap6
        Else
            Trap6.Disable() ; disable Trap6
        EndIf
        
        If (Trap7.IsDisabled()) ; if Trap7 is disabled
            Trap7.Enable() ; enable Trap7
        Else
            Trap7.Disable() ; disable Trap7
        EndIf
        
        If (Trap8.IsDisabled()) ; if Trap8 is disabled
            Trap8.Enable() ; enable Trap8
        Else
            Trap8.Disable() ; disable Trap8
        EndIf

        If (Trap9.IsDisabled()) ; if Trap9 is disabled
            Trap9.Enable() ; enable Trap9
        Else
            Trap9.Disable() ; disable Trap9
        EndIf
    EndEvent


    ObjectReference Property Trap1  Auto  

    ObjectReference Property Trap2  Auto

    ObjectReference Property Trap3  Auto

    ObjectReference Property Trap4  Auto  

    ObjectReference Property Trap5  Auto

    ObjectReference Property Trap6  Auto

    ObjectReference Property Trap7  Auto  

    ObjectReference Property Trap8  Auto

    ObjectReference Property Trap9  Auto

     

     

    They Both work fell free to use them when you want to

×
×
  • Create New...