Swat715 Posted March 17, 2019 Author Share Posted March 17, 2019 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? Link to comment Share on other sites More sharing options...
LoneRaptor Posted March 17, 2019 Share Posted March 17, 2019 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). Link to comment Share on other sites More sharing options...
Swat715 Posted March 17, 2019 Author Share Posted March 17, 2019 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? Link to comment Share on other sites More sharing options...
LoneRaptor Posted March 17, 2019 Share Posted March 17, 2019 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 Link to comment Share on other sites More sharing options...
Swat715 Posted March 17, 2019 Author Share Posted March 17, 2019 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? Link to comment Share on other sites More sharing options...
LoneRaptor Posted March 17, 2019 Share Posted March 17, 2019 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. Link to comment Share on other sites More sharing options...
Recommended Posts