Editing a default script help?

Post » Tue Nov 20, 2012 1:43 pm

I have a portcullis with the Default2StateActivator script.
It can be activated by a pullchain and by a triggerbox.
I want to add a line to the Default2State script so that it will be activated if it is already open or if it is activated by pullchain.
If it is closed I only want the pullchain to work.
The part of the script that needs conditional added is this section (I think):

auto STATE waiting ; waiting to be activated
EVENT onActivate (objectReference triggerRef)
; Debug.Trace("d2SA RESETS: " + Self + " " + isOpen)

if ( isOpen || (activator is the pullchain) )
; switch open state when activated
SetOpen(!isOpen)
if (doOnce)
gotostate("done")
endif
endif

endEVENT
endState
How do I check to see if the activator was the pullchain and not the triggerbox?
User avatar
Racheal Robertson
 
Posts: 3370
Joined: Thu Aug 16, 2007 6:03 pm

Post » Tue Nov 20, 2012 3:03 am

Wouldn't your changes then effect everything that uses that script? Don't think you ought to be editing vanilla scripts especially if you're releasing the mod.
User avatar
Harry Leon
 
Posts: 3381
Joined: Tue Jun 12, 2007 3:53 am

Post » Tue Nov 20, 2012 10:03 am

Don't do that, just click add and make a new one, you can COPY the vanilla one so you can do what you want.

Only change vanilla if you want to change all the game.
User avatar
Claudz
 
Posts: 3484
Joined: Thu Sep 07, 2006 5:33 am

Post » Tue Nov 20, 2012 4:02 am

Help. I clicked add then new to add a new script to my door. Copied the working script from my edited script and pasted it into my newy named script. It didn't compile but I saved it anyway. I then reedited the default script back to it's origional state and saved. I tried to delete the origional script from my door leaving only my newly named sript but I can't remove the origional. The symbol in front of it goes from a green arrow to a red minus but it won't go away.

I thought if you changed somnething in the rendor window it only changes that instance of it and doesn't affect any other instance of it. I;ve dragged items into my cell and made changes to their size and other things and it only affected the one item I changed.
User avatar
Ricky Meehan
 
Posts: 3364
Joined: Wed Jun 27, 2007 5:42 pm

Post » Tue Nov 20, 2012 1:40 am

You need to do a lot of reading crossi:

http://www.creationkit.com/Papyrus

The copy paste didnt work because of the first line;

Original one says (for example):

Scriptname ImTheOriginalScript extends ObjectReference

Your copy has to say:

Scriptname ImTheCOPYScript extends ObjectReference

And NOT:

Scriptname ImTheOriginalScript extends ObjectReference

You have to edit that first line.
User avatar
aisha jamil
 
Posts: 3436
Joined: Sun Jul 02, 2006 11:54 am


Return to V - Skyrim