Trigger fire to start at a certain time

Post » Wed Nov 04, 2009 3:05 pm

I am making a Medeval-style manor and at the entrance, and at the pathway I am going to place braziers (those round stone that's hold a firepit and some fire) but I want to make the fire "start" at a certain time. Like during the daytime it is not lit, but when it hits 8:00pm they turn on, supposedly by the guards. Anybody know how to do it? I've seen it on other mods, but I never really figured out how to do it.
User avatar
Rich O'Brien
 
Posts: 3381
Joined: Thu Jun 14, 2007 3:53 am

Post » Wed Nov 04, 2009 6:41 am

There is a script in MSFD that you could use. You would need to change the start and end positions and the possibly the Moveworld (also the object ID's).

Begin MyLightScheduleshort control_fire ;don't know what this is used for; The script is attached to an NPC that guards the fire.;******* this controls the fires schedule:if ( GetDistance, my_firepit < 600 ) ;you may not need this part     If ( GameHour < 20 )          if ( my_light->GetPos Z >= 400 )               my_light->MoveWorld z, -0.1 ; Move fire down          else               my_light->disable          endif     elseif ( GameHour >= 20 )                my_light->enable                if ( my_light->GetPos Z < 511 )                my_light->MoveWorld z, 0.1 ; move fire up           else                my_light->enable                endif     endifendifend


Can you work with that?
User avatar
DAVId MArtInez
 
Posts: 3410
Joined: Fri Aug 10, 2007 1:16 am

Post » Wed Nov 04, 2009 6:19 pm

There is a script in MSFD that you could use. You would need to change the start and end positions and the possibly the Moveworld (also the object ID's).

Begin MyLightScheduleshort control_fire ;don't know what this is used for; The script is attached to an NPC that guards the fire.;******* this controls the fires schedule:if ( GetDistance, my_firepit < 600 ) ;you may not need this part     If ( GameHour < 20 )          if ( my_light->GetPos Z >= 400 )               my_light->MoveWorld z, -0.1 ; Move fire down          else               my_light->disable          endif     elseif ( GameHour >= 20 )                my_light->enable                if ( my_light->GetPos Z < 511 )                my_light->MoveWorld z, 0.1 ; move fire up           else                my_light->enable                endif     endifendifend


Can you work with that?


I can try. I am not the best with scripting. If I have any issues, I'll get back to you.
User avatar
Miss K
 
Posts: 3458
Joined: Sat Jan 20, 2007 2:33 pm

Post » Wed Nov 04, 2009 11:57 am

Hmm. I have a problem. When it is daytime, it continues to go down, like it's supposed to but when it comes nightfall it is still slowly moving and not rising back up. I can give you a link to the mod and you can check it out if you want, but I am using that same script. Here's what I have.


I have a guard next to the brazier. I renamed them so that it would fit to the script, and the guard would operate it. It works during the day, but never comes back up.
User avatar
Bitter End
 
Posts: 3418
Joined: Fri Sep 08, 2006 11:40 am

Post » Wed Nov 04, 2009 7:53 am

I tried the MSFD script and had some odd results as well.

Here is a simple script to achieve the effect:

Begin AAA_Fireif ( GameHour < 7.9 )     elseif ( GameHour < 8.1 )                 aaa_My_Light-> disableelseif ( GameHour < 19.9 )         elseif ( GameHour < 20.1 )      aaa_My_Light-> enableendifend


I'm still testing the other to see if I can get it working.
User avatar
Project
 
Posts: 3490
Joined: Fri May 04, 2007 7:58 am


Return to III - Morrowind