Aller au contenu

Photo

Weather script for area


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
Sonmeister

Sonmeister
  • Members
  • 167 messages
Has anyone written a script for area weather like rain or snow so I could see an example?

#2
Challseus

Challseus
  • Members
  • 1 032 messages
I haven't, but I'm not sure how feasible it would be. I hope I'm totally wrong, but I've only seen rain/snow as props.... stuff you can only add to a level, and thus cannot be dynamically changed. Now, if they could be turned into place-ables somehow, that opens up a whole world of possibilities.

#3
Sunjammer

Sunjammer
  • Members
  • 925 messages
What are you wanting the script to do?

Modifié par Sunjammer, 13 mai 2011 - 07:19 .


#4
Hel

Hel
  • Members
  • 420 messages
Have you considered area-wide visual effects that can be toggled on and off through scripts?

#5
Proleric

Proleric
  • Members
  • 2 346 messages
I haven't been able to get area-wide VFX to work as described in the wiki. Maybe I'm missing something...

The weather VFX seem to be localised. However, you can apply them to several carefully-chosen locations in the area to achieve a uniform appearance, e.g.

Engine_ApplyEffectAtLocation(EFFECT_DURATION_TYPE_PERMANENT,
EffectVisualEffect(4011), lLocation);

To remove all such effects from the area, in this example,

RemoveVisualEffect(oArea, 4011);

Obviously, you'd need to use these snippets in the events that turn the weather on and off (area preload, trigger, conversation or whatever).

This is just the VFX, of course - in practice, you'd toggle sound, too.

Modifié par Proleric1, 14 mai 2011 - 08:52 .


#6
Sonmeister

Sonmeister
  • Members
  • 167 messages
Thanks Proleric1, that's what I was finding is that it was localised after experimenting so I thought maybe I just wasn't doing it right. I wondered if there was any way besides using objects from the area level editor.