Papyrus Help: Creating a Load Door That Cycles on an Activat

Post » Mon Nov 19, 2012 11:57 am

Hello, I'm creating an mod that adds new content to trainwiz's Aethernautics mod found here: http://skyrim.nexusmods.com/mods/23260
He uses an activator script that cycles where the spaceship jumps to. What I'm trying to do is create a load door that changes where it lets out based on what state this activator is set to. Any code I have tried has gone in completely the wrong direction. I'm just not sure how to change where a loading door lets out based on what a global variable is currently set to.

The code for the navigation change is here:

Scriptname _an_jumpselect extends ObjectReference  {The script to select your jump destination}GlobalVariable Property LaunchV autoGlobalVariable Property LaunchV2 autoEvent OnActivate(ObjectReference akActionRef)if(LaunchV2.GetValue() == 1)	if(LaunchV.GetValue() == 0)		LaunchV.SetValue(1)		Debug.MessageBox("Current Jump Destination: Sotha Sil")	elseif(LaunchV.GetValue() == 1)		LaunchV.SetValue(2)		Debug.MessageBox("Current Jump Destination: Masser")	elseif(LaunchV.GetValue() == 2)		LaunchV.SetValue(0)		Debug.MessageBox("Current Jump Destination: Tamriel")	endifelseDebug.MessageBox("Navigation Offline")endifEndEvent

And the code that activates the "jump":

Scriptname _an_doJump extends ObjectReference  {Does da jump}GlobalVariable Property LaunchV autoGlobalVariable Property LaunchV2 autoGlobalVariable Property LaunchV3 autoSound Property JumpSound autoImageSpaceModifier Property jump1 autoImageSpaceModifier Property jump2 autoImageSpaceModifier Property jump3 autoImageSpaceModifier Property jump4 autoImageSpaceModifier Property jump5 autoShaderParticleGeometry Property PSGD  Auto  Event OnActivate(ObjectReference akActionRef)if(LaunchV3.GetValue() == 1)	if(LaunchV.GetValue() == 0)		JumpSound.Play(Self)Game.ShakeCamera(afDuration = 10)PSGD.Apply(1.0)		Utility.Wait(1)		jump1.apply()		Utility.Wait(1)		jump1.remove()		jump2.apply()		Utility.Wait(1)		jump2.remove()		jump3.apply()		Utility.Wait(1)		jump3.remove()		jump4.apply()		Utility.Wait(1)		jump4.remove()		jump5.apply()		Utility.Wait(2)		jump5.remove()PSGD.Remove(1.0)		LaunchV2.SetValue(0)	endif	if(LaunchV.GetValue() == 1);1 is Sotha SilGame.ShakeCamera(afDuration = 10)		JumpSound.Play(Self)PSGD.Apply(1.0)		Utility.Wait(1)		jump1.apply()		Utility.Wait(2)		jump1.remove()		jump2.apply()		Utility.Wait(1)		jump2.remove()		jump3.apply()		Utility.Wait(1)		jump3.remove()		jump4.apply()		Utility.Wait(1)		jump4.remove()		jump5.apply()		Utility.Wait(2)		jump5.remove()PSGD.Remove(1.0)		LaunchV2.SetValue(1)	endif	if(LaunchV.GetValue() == 2);2 is MasserGame.ShakeCamera(afDuration = 10)		JumpSound.Play(Self)PSGD.Apply(1.0)		Utility.Wait(1)		jump1.apply()		Utility.Wait(1)		jump1.remove()		jump2.apply()		Utility.Wait(1)		jump2.remove()		jump3.apply()		Utility.Wait(1)		jump3.remove()		jump4.apply()		Utility.Wait(1)		jump4.remove()		jump5.apply()		Utility.Wait(2)		jump5.remove()PSGD.Remove(1.0)		LaunchV2.SetValue(2)	endifelseDebug.MessageBox("Navigation Offline")endifEndEvent

*Note that a good chunk of that code has to do with the visual effects that make it look like an interplanetary jump.

I've really run into a brick wall here with this problem, so any help would be super! :biggrin:
User avatar
CRuzIta LUVz grlz
 
Posts: 3388
Joined: Fri Aug 24, 2007 11:44 am

Post » Mon Nov 19, 2012 8:55 pm

You could copy what the tonal pads script does. It's an activator that teleports the player to a location based on what launchv2 (a global variable) is set to in the second script.
Just take that, remove the visual effects and sound, and connect it to the door, or make the door an activator.
User avatar
Cartoon
 
Posts: 3350
Joined: Mon Jun 25, 2007 4:31 pm

Post » Mon Nov 19, 2012 3:29 pm

I'll try that. Thanks!
User avatar
Jerry Jr. Ortiz
 
Posts: 3457
Joined: Fri Nov 23, 2007 12:39 pm


Return to V - Skyrim