Jump to content

Photo

script triggers for weather


7 replies to this topic

#1 jastey

jastey
  • Gibberlings
  • 7472 posts
  • Gender:Female

Posted 14 August 2004 - 01:05 PM

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.gibberl...bg2triggers.htm doesn't list this (or I am too blind to see).

Thanks for your answers!

Edited by jastey, 14 August 2004 - 11:07 PM.


#2 jastey

jastey
  • Gibberlings
  • 7472 posts
  • Gender:Female

Posted 15 August 2004 - 01:35 AM

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???

#3 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Gibberling Poobah
  • 9724 posts
  • Gender:Not Telling

Posted 15 August 2004 - 05:18 AM

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.

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.


#4 Domi

Domi

    Where is now your Troy, O Cassandra?

  • Gibberlings
  • 12706 posts
  • Gender:Male
  • Location:Canada

Posted 15 August 2004 - 06:05 AM

Thank you, Cam. That's a very useful script!
Faster. Faster. Faster would be better. -Mal Reynolds, Serenity
I understand that folks prefer code that works. -CamDawg, G3

#5 jastey

jastey
  • Gibberlings
  • 7472 posts
  • Gender:Female

Posted 15 August 2004 - 07:03 AM

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?)

#6 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Gibberling Poobah
  • 9724 posts
  • Gender:Not Telling

Posted 15 August 2004 - 07:17 AM

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.

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.


#7 jastey

jastey
  • Gibberlings
  • 7472 posts
  • Gender:Female

Posted 15 August 2004 - 07:22 AM

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

#8 igi

igi

    IESDP Guardian

  • Gibberlings
  • 1221 posts
  • Gender:Male

Posted 15 August 2004 - 01:45 PM

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.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users