Jump to content

script triggers for weather


jastey

Recommended Posts

Hi,

I want to check the weather in BGII, and there are weather identifiers:

 

0 NOWEATHER

1 RAIN

2 SNOW

3 FOG

 

but I don't know what the script triggers should be?

 

Is it just "weather" (like Weather(0) // NOWEATHER)?

 

Unfortunate, the great list at

http://iesdp.gibberlings3.net/scripting/bg2triggers.htm doesn't list this (or I am too blind to see).

 

Thanks for your answers!

Link to comment

OK, I just learned that there IS no script trigger for the weather in the trigger.ids... :(

 

I wanted to write a NPC-PC dialogue that should only happen if the sun is shining.

ANYONE having ANY ideas how I can do that? Is there a way of changing the trigger.ids? Can I, maybe via some script file, influence the weather before my talk starts???

Link to comment

There's no trigger to detect the weather, but you could force a weather change, sure.

 

IF 
(conditions for dialogue)
Global("BanterVar","GLOBAL",0)
TimeOfDay(Day)
!AreaType(DUNGEON)
!AreaType(EXTENDEDNIGHT)
OR(4)
 AreaType(OUTDOOR)
 AreaType(CITY)
 AreaType(WEATHER)
 AreaType(FOREST)
THEN 
 RESPONSE #100
   SetGlobal("BanterVar","GLOBAL",1)
   Weather(NOWEATHER)
   SetGlobalTimer("WeatherChange","GLOBAL",10)
END

IF 
(conditions for dialogue)
Global("BanterVar","GLOBAL",1)
TimeOfDay(Day)
!AreaType(DUNGEON)
!AreaType(EXTENDEDNIGHT)
OR(4)
 AreaType(OUTDOOR)
 AreaType(CITY)
 AreaType(WEATHER)
 AreaType(FOREST)
GlobalTimerExpired("WeatherChange","GLOBAL")
THEN
 RESPONSE #100
   SetGlobal("BanterVar","GLOBAL",2)
   StartDialogueNoSet(PLAYER1)
END

 

This will force a weather change, start a brief timer to allow the weather to change, then initiate the dialogue.

Link to comment

Thanks very much, Camdawg! This is easy and brilliant. This would be exactly what I need, because I really don't know in which area the Player will be if the dialogue will be initiated.

Only question: What does "AreaType(WEATHER)" mean? (And, as I am already asking, what does "AreaType(CANRESTOTHER)" mean?)

Link to comment

The AreaType(CANRESTOTHER) seems like another half-assed Bioware implemented flag. I only find it in a few random areas--Elven homes in Suldanesselar, left over BG areas, the Vulova Estate, a few areas in the de'Arnise Keep, etc. I can't find any rhyme or reason for it, perhaps someone else can explain what it's supposed to mean. :(

 

AreaType(WEATHER) appears to be an unused flag, as no IWD/IWD2/BG/BG2 areas are flagged with it. I would say it's safe to strip out of the script.

Link to comment
The AreaType(CANRESTOTHER) seems like another half-assed Bioware implemented flag. I only find it in a few random areas--Elven homes in Suldanesselar, left over BG areas, the Vulova Estate, a few areas in the de'Arnise Keep, etc. I can't find any rhyme or reason for it, perhaps someone else can explain what it's supposed to mean. :(

 

AreaType(WEATHER) appears to be an unused flag, as no IWD/IWD2/BG/BG2 areas are flagged with it. I would say it's safe to strip out of the script.

OK, that means I don't have to hide in shame I neither knew nor used them before... :p

By the way: You really filled my heart with joy with the weather changing script above. For a moment I thought I had to skip the two most romantic lovetalks I've written... :D

Link to comment

The WEATHER flag, I would presume, means that the area has weather effects.

The CANRESTOTHER flag, iirc, means you can rest there (even though you cant). Or something.

I'm not terribly sure, and I dont know if either work.

Link to comment

Archived

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

×
×
  • Create New...