Jump to content

Messed up vanilla script?


Ranokoa

Recommended Posts

Ok so ive been making mods for years now, and everytime i run accross this switch, or actually multiple switches that use the same script, i look at the script and it thuroughly confuses me as to WHY it is scripted like this. I never used them as a result, so i do not know if they funtion just like a button that activates its parent.. so i am going to show you the script, and ask you if you see something wrong with it, why a 'generic' button script is like this, and what relevance it can POSSIBLy have to being a button for generic uses.

 

scn ARSwitch01SCRIPT

short busy
ref target
ref mySelf

begin onActivate

if busy == 0
	set target to getParentRef
	set mySelf to getSelf
	target.activate mySelf 1
	playgroup forward 0
	set busy to 1
endif

If Player.GetInCell SkingradCastleDungeon == 1
	AnvilPrisonDoorRef.Lock
	BravilPrisonDoorRef.Lock
	BrumaPrisonDoorRef.Lock
	CheydinhalPrisonDoorRef.Lock
	ChorrolPrisonDoorRef.Lock
	ICPrisonDoorRef.Lock
	LeyawiinPrisonDoorRef.Lock
	SkingradPrisonDoorRef.Lock
EndIf

end

begin gameMode

if isAnimPlaying == 0 && busy == 1
	set busy to 0
endif

end

 

What on earth does the city prison referances have anything to do with anything?! Why are they there? Does this affect its ability to be used JUST to activate something without touching ANYTHING else ANYWHERE else?

 

i dont get it. Im no master scripter, but i can read scripts well.. but this.. this city referance thing just confuses me as to its purpose.

Link to comment
Share on other sites

Probably an oversight... there are quite a few if you know where to look. It was a general script, so that bit of scripting was likely either the remnant of some test, or because it wasn't removed when the script was changed to work with AR stuff. The condition is only valid in circumstances which are not likely to ever happen, so unless someone went looking through the scripts, they wouldn't have noticed anything.

 

Stuff like this isn't all that rare in any game or project. It's just something that was left behind that serves no use. Even the CR project has some of this extra, kinda useless scripting lying around from things I kinda needed to work, but have not had time to go back and fix. It is just merely a cost of working on any large project some things you just forget to go back over and tidy up or complete. Sometimes, you leave these things behind simply to remind yourself later of things you were meaning to go back to.

 

Is it bad? Not really, since for all you know, there could be some switch being called somewhere by a script when you are in skingrad dungeon, it's unlikely, but you never know.

Link to comment
Share on other sites

So.. using this as a generic activator will work without screwing things up? Like if i wanted it to raise a gate or set off a trap it should not hurt anything else?
Link to comment
Share on other sites

You ahev nothing to fear Ranokoa. You may gladly use this script as a generic switch script without messing up the game, provided your new switch isn't going in the Skingrad prison.

 

Another thing, I don't think Vagrant properly explained the script to you. Let me do that.

 

if busy == 0

set target to getParentRef <= Finds the object set as this switch's parent

set mySelf to getSelf <= Used for the script to do stuff to the switch that was activated.

target.activate mySelf 1

playgroup forward 0 <= Animates the switch

set busy to 1

endif

 

if isAnimPlaying == 0 && busy == 1 These three lines make you not able to activate

set busy to 0 the switch again while it is animating.

endif

 

And lastly, the part of the script about the prisons is to do with a specific Thieves Guild quest where one path of the quest's story allows you to escape from the Skingrad prison by using a switch to open a door. When you use the switch, the cell doors of all prisons lock, so that you won't be able to go back into your cell and act like you never escaped to the guards.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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