Jump to content

looking for help with console commands on scrips


grim5000

Recommended Posts

I'm trying to get the alter to show up in apocrypha because the setstage command didn't do it at all. i've found the script for the altar, but i'm not sure how i can go about activating it using the console. I took screenshots of what the script variables are and stuff.

http://imgur.com/a/RMMhD

 

i've tried using SETPV (find the commands with help papyrus) and tried to edit the variables of the altar while targeting it in the console, but nothing seemed to work.

Link to comment
Share on other sites

I'm probably not the best person to explain this but I was dealing with similar issues while working on the MC menu for my Immersive Dawnguard mod.

 

Straight console commands are only used when you open the console with the ~ key. The papyrus commands are almost always a bit different.

 

In the case of enabling or disabling an item, the console command is enable Item name To have that happen automatically via a papyrus script you need to word it item name.enable()

 

That's the simple part of the answer. The more complex part of the answer come in the when or how part of that activation. If you're talking about an activator that pops this altar into existence, then you just need an object that acts as a "light switch" that has an activation script attached to it. Darkfox127 has a great tutorial on YouTube for that. https://www.youtube.com/playlist?list=PLiPgFWIHsr8XixSs-odjlQt64NQ4CCYyw

 

The short version (assuming you're a little familiar with scripting already) is that you write a script that looks something like this script from DarkFox127's tutorial for a lightswitch:

 

 

Script Name DarkFox127Lightswitch extends ObjectReference

 

ObjectReference Property MainLight Auto

 

Event OnInit()

If (MainLight.IsDisabled()) <---- checks that the activator is disabled or off. "Mainlight" being the name of the activated object

GoToState("LightsOff") <----- States are kind of like subroutines in a script (oversimplified explanation).

Else

GoToState("LightsOn") The else option means there are only two choices. If you had multiple options, you'd need an ElseIf instead

EndIf

EndEvent

 

State LightsOff

EventOnBeginState() <---- this event tell the game what to do when this state is first switched to

MainLight.Disable() <----- here's that command I mentioned above

EndEvent

 

Event OnActivate(ObjectReference akActionRef) <---- this event tells the game what to do when the activator is "turned on"

GoToState("LightsOn")

EndEvent

EndState

 

State LightsOn

EventOnBeginState() <---- Again, this event tell the game what to do when this state is first switched to

MainLight.Enable() <----- here's where the object is enabled

EndEvent

 

Event OnActivate(ObjectReference akActionRef) <---- this event tells the game what to do when the activator is activated again, turning the switch off

GoToState("LightsOff")

EndEvent

EndState

 

Again, all credit for this script goes to DarkFox127. I just reproduced it from my notes on his tutorial and tried to add a few explanations,

 

That is essentially how you can enable and disable an object in game using an in game "switch" however. This also uses the more current version of Papyrus wording which is easier to trace errors when you understand the code.

 

DarkFox's tutorial also explains how to enable or disable several objects at once using this exact same method. It's fairly easy.

 

 

NOW, if you're looking to enable and disable the altar based on the state / progress of a quest, there are command on the CK Wiki that allow that also. I'm still a rookie on Quest scripting and creation though so I'll leave that for a more qualified person to answer.

Edited by rms827
Link to comment
Share on other sites

  • Recently Browsing   0 members

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