Jump to content

weather issues


angie

Recommended Posts

Hi, I was wondering if there is any way I could manipulate weather? What I'd like to do is make a staff that changes the weather, but I can't find any weather effect that I could use. Is there some way I could make a spell to make it rain etc so I can stick it on this staff? Thanks.

Link to comment

You could add an effect to the staff that sets a variable, and in the baldur.bcs add a script block that takes the action (and sets the variable back to zero). The action triger for wheather would be (shamelessly copied out of the IESDP action list):

 

Weather(I:Weather*Weather)

Is used to change the weather. This action will only work in outdoor areas with weather enabled....The weather is from weather.ids and has 4 choices: 0 NOWEATHER, 1 RAIN, 2 SNOW, 3 FOG, although fog does not work.

 

Note if you want to check if a certain weather conditon (like rain) is present you will need to set a GV (to 1) when you start the weather, then check to make sure the GV is at 1. Also u need to determine how long the weather lasts and set the GV back to 0 when the weather is done, using a timer.

 

IF

Global("KRSTORM","GLOBAL",0)

THEN

RESPON SE #100

Weather(RAIN)

SetGlobal("KRSTORM","GLOBAL",1)

END

 

with the identifyers

0 NOWEATHER

1 RAIN

2 SNOW

3 FOG

Link to comment

Thanks for the quick replies. I changed that script a little bit and I don't know if it's very efficient, but it does exactly what I want it to (for now). Added this to BALDUR.bcs:

 

IF
Global("KRSTORM","GLOBAL",1)
THEN
RESPONSE #100
	Weather(RAIN)
	SetGlobal("KRSTORM","GLOBAL",0)
END

IF
Global("KRSTORM","GLOBAL",2)
THEN
RESPONSE #100
	Weather(SNOW)
	SetGlobal("KRSTORM","GLOBAL",0)
END

IF
Global("KRSTORM","GLOBAL",3)
THEN
RESPONSE #100
	Weather(NOWEATHER)
	SetGlobal("KRSTORM","GLOBAL",0)
END

 

I can manipulate the weather perfectly with CLUAConsole:SetGlobal("KRSTORM","GLOBAL",#), so that must mean the script works just fine.

 

Now I have a problem with adding an effect to an item. Generally the item is as it should be, you can use it from equipment, it has its own little icons and charges, so it looks like a spell. The only thing I can't figure out is how to set that KRSTORM to 1 2 or 3.

 

What I did was use effect opcode #265 Script: Set Global Variable

 

Target: 0 None

Timing: 1-Permanent

Value: 1

Modifier Type: 0

1. Resource: KRSTORM

 

From what I understood in the opcode description this is how it should be set. The item charges work fine, I added an extra animation effect to see if the item is "working", however no weather changes happen at all.

 

Can anyone offer me any advice? I've never set a global variable with an effect before, so I'm sure it's all wrong. I need this effect to do what "CLUAConsole:SetGlobal("KRSTORM","GLOBAL",1)" would do.

Link to comment

Oops sorry disregard my last post, I think I figured out what I was doing wrong. I changed the target to self and it works fine now. My guess is it would probably work on any target other than "none".

 

Finally have my weather staff, thanks!

Link to comment

Archived

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

×
×
  • Create New...