Game Development Community

Togling Weather effects.

by AllynMcelrath · in Torque Game Engine · 12/11/2005 (2:01 pm) · 4 replies

Im not sure how to go about doing this, so ill try to explane what i wish to do.

I have two types of Perciption, one "rain", and one "Snow".

What i would like to do, is be able to initate switching between, nothing, rain, and snow..Real time with out loading a new mission. Threw the use of a script, that i can later Tie to some sort of timmer, but For now, attaching it to a buttion will work better.

If anyone can give me some pointers on how to even start somthing like this i would very much appreciate it.

And please! try to put it as simply as posable, im not a programer and am very new to even scripting.

Allyn.

#1
12/11/2005 (2:58 pm)
TorqueScript with Various Triggers in it, for Clear Rain Snow, Im not to good with TS but messaround with triggers in ts. And you should have it working in no time. Sorry I cant go beyond that.
#2
12/11/2005 (3:20 pm)
The rain class is just like any other Torque object, it can be created/deleted in script(missions are actualy just script files themselves). I've made a couple dynamic weather systems in the past(featured in Illumina), and it's pretty easy to get going.

First, you should create your rain/snow object in your mission and then save that out. Then go into the .mis file and cut out your rain/snow block and stick them in function like CreateRain() and CreateSnow(). You'll probably want to add some kind of global var to keep track of them, and also add them to the MissionCleanup.

Example:

function CreateRain() {
$Rain = new .....
.....
MissionCleanup.add($Rain);
}
#3
02/24/2006 (6:36 am)
Thanks
#4
02/25/2006 (2:30 pm)
Game Manager with Time and Weather

This is what you really want. Adding in snow should only be one (SHORT) new function and a few tweaks to 'weatherUpdate()'. That and adding your own snow-art into the correct folders.

As a side note i'm working on a new resource (Enviro-Torque 2.0) that reimplements this script in C++ with a day/night cycle but no ETA on when it's going to be done.

G/L