Jump to content

Photo

Teleporter Modding Help

teleporters modding fallout4

  • Please log in to reply
55 replies to this topic

#51
Swat715

Swat715

    Journeyman

  • Members
  • Pip
  • 49 posts

 

There is an EnableMarker in the statc category that you can use. Place one (these are invisible in game) and use that as the enable parent.
Then in the script add a property: (ObjectReference Property EnableMaker Auto) fill it with the ref for the enableMarker and change the script to this:

Event OnActivate(ObjectReference akActionRef)
    If ActivatorRef.IsDisabled();if the teleporter activator is disabled enable it
        ActivatorRef.Enable();disables the teleporter activator
        EnableMaker.Enable()
        EmitterRef.PlayGamebryoAnimation("stage3loop", True);starts animation stage3loop
        SoundEffectIncetanceID = OBJTeleporterJammerLP.Play(EmitterRef);starts the sound effects
    ElseIf !ActivatorRef.IsDisabled();if the teleporter activator is enabled disable it
        ActivatorRef.Disable();enables the teleporter activator
        EnableMaker.Disable()
        If SoundEffectIncetanceID ; checks if there is sound playing
            EmitterRef.PlayGamebryoAnimation("stage1", True); stops the animation
            Sound.StopInstance(SoundEffectIncetanceID) ;stops the audio loop
            ;SoundEffectIncetanceID = None ; clears the inctance property so the script knows there is no sound playing
        EndIf
    EndIf    
EndEvent

 

Im adding the new object refrence to the power switch? and then replacing the whole thing?



#52
LoneRaptor

LoneRaptor

    Old hand

  • Supporter
  • PipPipPip
  • 607 posts

Im adding the new object refrence to the power switch? and then replacing the whole thing?

Yes that will work but also setup the new object as the enable parent for the spark/smoke/sound effects.
The script has only changed by adding 2 lines to enable/disable the marker so just adding those 2 lines would be enough (starting from Event the 4th and the 9th line where added).

#53
Swat715

Swat715

    Journeyman

  • Members
  • Pip
  • 49 posts

 

Im adding the new object refrence to the power switch? and then replacing the whole thing?

Yes that will work but also setup the new object as the enable parent for the spark/smoke/sound effects.
The script has only changed by adding 2 lines to enable/disable the marker so just adding those 2 lines would be enough (starting from Event the 4th and the 9th line where added).

 

 

okay so whenever I add effects just use the enable marker as the parent and I wont have to worry about scripts?



#54
LoneRaptor

LoneRaptor

    Old hand

  • Supporter
  • PipPipPip
  • 607 posts

Yes anything you add that needs to be enabled when the power is turned on can just be linked to the enable parent without having to edit the script



#55
Swat715

Swat715

    Journeyman

  • Members
  • Pip
  • 49 posts

Sweet thank you so much! youve helped me more then enough. When i finally get my mod completed you'll be on the top of the thank you's/credit list lol if i have anymore scripting questions later down the road would you mind if i private messege you?



#56
LoneRaptor

LoneRaptor

    Old hand

  • Supporter
  • PipPipPip
  • 607 posts

Sweet thank you so much! youve helped me more then enough. When i finally get my mod completed you'll be on the top of the thank you's/credit list lol if i have anymore scripting questions later down the road would you mind if i private messege you?

That's ok.







Also tagged with one or more of these keywords: teleporters, modding, fallout4

Page loaded in: 0.788 seconds