Jump to content

Recommended Posts

Presuming you're using the previously posted script this should do it

Scriptname LightDelay extends ObjectReference

ObjectReference Property Light01 Auto

ObjectReference Property Light02 Auto

ObjectReference Property Light03 Auto

ObjectReference Property Light04 Auto

Event OnActivate(ObjectReference akActionRef)
    If(Light01.IsDisabled())
        Self.BlockActivation(abBlocked = true, abHideActivateText = true)
        Light01.enable()
        Utility.Wait(1)
        Light02.enable()
        Utility.Wait(1)
        Light03.enable()
        Utility.Wait(1)
        Light04.enable()      
        Utility.Wait(1)
        Self.BlockActivation(false)
    Else
        Self.BlockActivation(abBlocked = true, abHideActivateText = true)
        Light01.disable()
        Light02.disable()
        Light03.disable()
        Light04.disable()
        Self.BlockActivation(false)
    EndIf
EndEvent

Intentionally hiding the activation text so the user doesn't think they can try to activate it. Then putting it back when they can. I left the last wait at the end of activating light #4 though I'm not sure if you really need it. The only useful purpose it has in this case is that it makes the user wait 1 second before they can trigger the activator again. Perhaps that is desired behavior.

Link to comment
Share on other sites

Is there any website that list all this kind of arguments else then the wiki, i never find anything on it.

Thanks for the code, it will be usefull.

The vanilla scripts themselves are pretty documented for things that make sense. If nothing else it will give insight as to what arguments any functions or events can take.

Link to comment
Share on other sites

anyone here know how to "Convert" G.E.C.K. script to Papyrus Script? I am trying to build a mod similar to one of my own New Vegas Mods, Basically to show a difference between the Female and Male player character's back grounds. The Script would be linked to a book of sorts.

 

The Fallout NV Script went like this.

 

BEGIN ONACTIVATE
If GetPCIsSex Male
player.addperk ActionBoy
player.addperk ConfirmedBachelor
player.addperk LadyKiller

showMessage malePerkAdded
disable

ENDIF

 

If GetPCIsSex Female
player.addperk ActionGirl
player.addperk CherchezLaFemme
player.addperk BlackWidow

showMessage femalePerkAdded
disable

ENDIF

END

 

Now how do I convert it to work with Fallout 4? and go slow...this whole Papyrus scripting has me really confused. LOL

Edited by zygster525
Link to comment
Share on other sites

anyone here know how to "Convert" G.E.C.K. script to Papyrus Script? I am trying to build a mod similar to one of my own New Vegas Mods, Basically to show a difference between the Female and Male player character's back grounds. The Script would be linked to a book of sorts.

 

The Fallout NV Script went like this.

 

BEGIN ONACTIVATE

If GetPCIsSex Male

player.addperk ActionBoy

player.addperk ConfirmedBachelor

player.addperk LadyKiller

showMessage malePerkAdded

disable

 

ENDIF

 

If GetPCIsSex Female

player.addperk ActionGirl

player.addperk CherchezLaFemme

player.addperk BlackWidow

showMessage femalePerkAdded

disable

 

ENDIF

END

 

Now how do I convert it to work with Fallout 4? and go slow...this whole Papyrus scripting has me really confused. LOL

 

You really should have made your own topic. But since it's already done here goes. You need to create the script on the object you play to be activating. The script type will extend ObjectReference. Then paste this and you'll have a base to start with. Then add properties for the perks you want to deal with and edit as desired. Partially from the wiki https://www.creationkit.com/index.php?title=GetSex_-_ActorBase If you still need more help I would suggest making your own topic so you get more specific help for your question.
Event OnActivate(ObjectReference akActionRef)
    Actor PlayerRef = Game.GetPlayer()
    ActorBase PlayerBase = PlayerRef.GetActorBase()
    if (PlayerBase.GetSex() == 0) ; player is male
      Debug.Trace("Player is male")
      ;PlayerRef.AddPerk(someperk)
    else ; player is female
      Debug.Trace("Player is female")
      ;PlayerRef.AddPerk(someotherperk)
    endIf
EndEvent
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...