switch on and off brazier and torches possible?

Post » Thu Jun 21, 2012 2:19 am

Is there any way to be able to switch on Torches and braziers when the player interacts with them? is there something similar ingame to copy the setup?
User avatar
Loane
 
Posts: 3411
Joined: Wed Apr 04, 2007 6:35 am

Post » Thu Jun 21, 2012 12:49 am

just an idea: make the brazier an activator and when activated it disables burning embers and the light which should be near it and enables embers which aren't burning, and vice versa.
Ingame there are these torches which you can take out of their sconces but the sconces have a special mesh which the braziers don't have.
User avatar
Everardo Montano
 
Posts: 3373
Joined: Mon Dec 03, 2007 4:23 am

Post » Wed Jun 20, 2012 2:36 pm

yeh I guessed that too but have no idea how to do it ....
User avatar
Stace
 
Posts: 3455
Joined: Sun Jun 18, 2006 2:52 pm

Post » Wed Jun 20, 2012 1:25 pm

There are some torches you could turn on and off at http://www.uesp.net/wiki/Skyrim:Rannveig%27s_Fast... Or maybe it was just allowing you to put a lit torch in the sconces.
User avatar
Rik Douglas
 
Posts: 3385
Joined: Sat Jul 07, 2007 1:40 pm

Post » Wed Jun 20, 2012 11:59 pm

http://www.creationkit.com/Additional_Prefabs#Removable_Torches
User avatar
Brentleah Jeffs
 
Posts: 3341
Joined: Tue Feb 13, 2007 12:21 am

Post » Wed Jun 20, 2012 10:47 am

;Attach this script to the activator;Make the firemarker the enable parent for everything you want to turn on;Set the firemarker to "initially disabled"objectreference property myfiremarker autobool lightson = false ;default stateEvent OnActivate()	if ( lightson == false )		lightson = true		myfiremarker.enable()	endif		;If you want them to switch off when activating again, uncomment this:	;if ( lightson == true )	;	lightson = false	;	myfiremarker.disable()	;endif	Endevent
User avatar
Minako
 
Posts: 3379
Joined: Sun Mar 18, 2007 9:50 pm

Post » Wed Jun 20, 2012 5:08 pm

but the brazier has light by itself when without placing a light shoudl I put a light on off or the brazier or what?
User avatar
Love iz not
 
Posts: 3377
Joined: Sat Aug 25, 2007 8:55 pm

Post » Wed Jun 20, 2012 10:06 am

The brazier does NOT have light. The brazier has an animation. If you want the brazier to appear "off," you'll have to write a script that replaces the "on" version with the "off" version.
User avatar
Ymani Hood
 
Posts: 3514
Joined: Fri Oct 26, 2007 3:22 am

Post » Wed Jun 20, 2012 9:28 pm

The brazier does NOT have light. The brazier has an animation. If you want the brazier to appear "off," you'll have to write a script that replaces the "on" version with the "off" version.

You can use the same script; Just set the on version to initially disabled, and use the same enable parent. It will be enabled when the marker is disabled. Maybe you have to set it to "opposite of parent" or something too.
User avatar
Ron
 
Posts: 3408
Joined: Tue Jan 16, 2007 4:34 am

Post » Wed Jun 20, 2012 4:38 pm

but there is an off version ? I cant find , all have some sort of light from soft to heavy flames , I mean the ember object that you place inside the brazier containers , also the light type , radius etc should be linked no?
User avatar
Alkira rose Nankivell
 
Posts: 3417
Joined: Tue Feb 27, 2007 10:56 pm

Post » Wed Jun 20, 2012 6:50 pm

The light has to be added to the scenery separately (those light bulbs), just add it to the script like you did with the embers...I'm sure there is an ember without flames, just keep checking...
User avatar
jesse villaneda
 
Posts: 3359
Joined: Wed Aug 08, 2007 1:37 pm

Post » Wed Jun 20, 2012 5:45 pm

but there is an off version ? I cant find , all have some sort of light from soft to heavy flames , I mean the ember object that you place inside the brazier containers , also the light type , radius etc should be linked no?

http://i.imgur.com/Pr2FU.jpg

Edit: Actually, the script is supposed to go on the brazier itself not on the marker. And you'll have to make a new one that's an activator. My mistake in the example image.

Alternatively, you can just not have the off embers at all, but it looks a little bad.
To make it even more interesting, you could require that the user be wielding a torch to activate it:
Event OnActivate(ObjectReference akActionRef)	if (akActionRef = Game.GetPlayer() && Game.GetPlayer().GetEquippedItemType(0) == 11 )			if ( lightson == false )				lightson = true				myfiremarker.enable()		endif			endif			;If you want them to switch off when activating again, uncomment this:	;if ( lightson == true )	;	   lightson = false	;	   myfiremarker.disable()	;endif		Endevent
User avatar
Connie Thomas
 
Posts: 3362
Joined: Sun Nov 19, 2006 9:58 am

Post » Wed Jun 20, 2012 6:17 pm

With the below, you could set it all up with only one, non-persistent REFR.
SScriptName LightSwitchScript extends ObjectReferenceBool bLights = FalseObjectReference rLight = NoneLight Property DesiredLight AutoEvent OnActivate(ObjectReference akActionRef)	If bLights != rLight As Bool		bLights = !bLights		If bLights ; On			rLight = PlaceAtMe(DesiredLight)		Else ; Off			rLight.Disable()			rLight.Delete()			rLight = None		EndIf	EndIfEndEvent
For multiple choices or colored lights:
Spoiler
ScriptName LightSwitchScript extends ObjectReferenceBool bLights = FalseObjectReference rLight = NoneLight Property GreenLight AutoLight Property YellowLight AutoLight Property RedLight AutoMessage Property LightChoiceMESG AutoEvent OnActivate(ObjectReference akActionRef)	If bLights != rLight As Bool		bLights = !bLights		If bLights ; On			Int iButton = LightChoiceMESG.Show()			If (iButton == 0)				rLight = PlaceAtMe(GreenLight)			ElseIf (iButton == 0)				rLight = PlaceAtMe(YellowLight)			ElseIf (iButton == 0)				rLight = PlaceAtMe(RedLight)			EndIf		Else ; Off			rLight.Disable()			rLight.Delete()			rLight = None		EndIf	EndIfEndEvent
User avatar
Flutterby
 
Posts: 3379
Joined: Mon Sep 25, 2006 11:28 am

Post » Wed Jun 20, 2012 1:46 pm

I think the way should work shoudl be :

Off Brazier ....

The player approaches with a torch fired up ....

uses the torch on the brazier and consumes 1-3 torches

if uses 3 torches then the brazier lights up with maximum intensity and logs model

if uses 2 torches medium intensity

if uses 1 torch minimal intensity

then the brazier light will last for an x time dependant on the number of torches used and the brazier embers will change accordingly as time passes .. like 48 hours a 3 torch , 24 h a 2 torch 12 h a 1 torch ... then turn slowly from the maximum switched to the off ember status .

I think it coul dbe a cool resource mod for who is able tomake it and very usefull for many modders , unfortunately I do not have much time to spend in scripting stuff and test this ....
User avatar
jasminε
 
Posts: 3511
Joined: Mon Jan 29, 2007 4:12 am

Post » Wed Jun 20, 2012 10:01 pm

I think the way should work shoudl be :

Off Brazier ....

The player approaches with a torch fired up ....

uses the torch on the brazier and consumes 1-3 torches

if uses 3 torches then the brazier lights up with maximum intensity and logs model

if uses 2 torches medium intensity

if uses 1 torch minimal intensity

then the brazier light will last for an x time dependant on the number of torches used and the brazier embers will change accordingly as time passes .. like 48 hours a 3 torch , 24 h a 2 torch 12 h a 1 torch ... then turn slowly from the maximum switched to the off ember status .

I think it coul dbe a cool resource mod for who is able tomake it and very usefull for many modders , unfortunately I do not have much time to spend in scripting stuff and test this ....

It isn't that hard, just add 3 sets of lights/flame objects and make 3 if statements onactivate...

;Each of these is the enable parent for bigger fires/lightsobjectreference property marker01 autoobjectreference property marker02 autoobjectreference property marker03 autoint lightscount = 0Event OnActivate(ObjectReference akActionRef)	if (akActionRef = Game.GetPlayer() && Game.GetPlayer().GetEquippedItemType(0) == 11 )		if ( lightscount == 0 )			marker01.enable()			lightscount += 1		else		if ( lightscount == 1)			marker02.enable()			lightscount += 1		else		if ( lightscount == 2 )			marker03.enable()			lightscount += 1		endif	endif				Endevent

If you want it to be where the player must hit it with a torch, make the event OnHit instead of OnActivate, get the "bashing" paramater, and add another condition to the first if for it: && abBashAttack == true

Edit: It looks like there's actually an elseif word, so use that.

Also this seems a little complicated to actually be practical, unless it's a key part of your quest line or something... I don't think I would even know to light the brazier while I was playing unless I was instructed to do that (explicitly or implicitly)
User avatar
Rebecca Dosch
 
Posts: 3453
Joined: Thu Jan 18, 2007 6:39 pm

Post » Wed Jun 20, 2012 2:27 pm

I cant seem to compile any script and each time I try to open one it asks for an external program , I tried to open with the notepad ++ but it won't load and I am forced toopen with a normal pad editor ... then I have no idea how all this scripting stuff work ... if is simple woudl u be able to make it? so may be we could all use :) ...
User avatar
Assumptah George
 
Posts: 3373
Joined: Wed Sep 13, 2006 9:43 am

Post » Wed Jun 20, 2012 2:15 pm

I cant seem to compile any script and each time I try to open one it asks for an external program , I tried to open with the notepad ++ but it won't load and I am forced toopen with a normal pad editor ... then I have no idea how all this scripting stuff work ... if is simple woudl u be able to make it? so may be we could all use :smile: ...

I just wrote 90% of the script for you and pasted it here...
User avatar
vanuza
 
Posts: 3522
Joined: Fri Sep 22, 2006 11:14 pm

Post » Wed Jun 20, 2012 1:34 pm

and how I do the 10 ?% :) ...
User avatar
FoReVeR_Me_N
 
Posts: 3556
Joined: Wed Sep 05, 2007 8:25 pm


Return to V - Skyrim