Game Development Community

Add Rain and Snow to starter.fps

by Billy L · in Torque Game Engine · 08/19/2004 (4:05 am) · 29 replies

Hi all getting started guys !

This is how you add rain or snow to the starter.fps


1. copy from example/demo/data the environment folder to
example/starter.fps/data/

2. copy from example/demo/data/sound the environment folder to
example/starter.fps/data/sound/

3. copy from example/demo/server/scripts the environment.cs to
example/starter.fps/server/scripts

4. In example/starter.fps/server/scripts add this line to game.cs
exec("./environment.cs");

5. for the snow make a new snow texture, place the texture in
the example/starter.fps/data/environment folder

6. add this code in enviroment.cs
datablock PrecipitationData(Snow)
{
   soundProfile = "";

   dropTexture = "~/data/environment/snow";
   splashTexture = "~/data/environment/water_splash";
   dropSize = 0.45;
   splashSize = 0.2;
   useTrueBillboards = false;
   splashMS = 250;
};

Try it out !
Hope this helps !

-Billy
Page «Previous 1 2
#1
08/19/2004 (5:35 am)
...
#2
08/20/2004 (7:24 pm)
BIlly, nice thread. I knew how to add precipitation already but I wanted to give a shout. Its a clear title with clear information... just what novice torquers need.
#3
08/23/2004 (6:32 am)
Thanks man!
#4
08/23/2004 (2:18 pm)
Thanks for the info, but in the resource section there's a website with that type of info.
#5
08/23/2004 (3:35 pm)
@George
I only wrote this because people ask in the forums all the time !
#6
08/25/2004 (5:09 pm)
Newbie question: I moved the files and added the code, but how do I make it rain in game?
#7
08/25/2004 (5:46 pm)
1 start the game
2.press F11
3.press f4
4.choose missionobjects/enviroment/precipitation
5.choose Heavyrain or snow at precipitation data press OK
6.I hope it rains or snow now :)
7. good luck
#8
08/27/2004 (2:07 pm)
It don't say Heavyrain or Snow at the precipitation data... well, it says nothing at all :\
#9
08/27/2004 (7:03 pm)
Will not work for me either... found the solution
you need to type exec("./environment.cs"); the ./ shows torque were the folder is in relation to the prog
#10
08/28/2004 (3:22 am)
@Garbageman
Good eyes i forgot that above,i edited the above line!
Sorry :)
#11
08/28/2004 (4:35 pm)
No prob You just saved me some time in adding snow to my project that I am working on>>>Terra: battle for Europa... TY
#12
08/28/2004 (5:01 pm)
I edited the line and it's still not showing... this is what I did...

1: copied the environment folder from example/demo/data to example/starter.fps/data/
2: copied the environment folder from example/demo/data/sound to example/starter.fps/data/sound/
3: copied the environment.cs file from example/demo/server/scripts to example/starter.fps/server/scripts
4: added the line
exec("./environment.cs"); 
under the line
exec("./aiPlayer.cs");

I only want rain so I didn't bother with the snow code...

I went in to the game and did what "Billy ScE"
Quote:1 start the game
2.press F11
3.press f4
4.choose missionobjects/enviroment/precipitation
5.choose Heavyrain or snow at precipitation data press OK
6.I hope it rains or snow now :)

But the "heavyrain" in the precipitation data menu isn't showing.

I'm using the latest Head, someone help plz :\
#13
08/28/2004 (5:10 pm)
Not sure if this will help but did you make sure to recompile the TorqueDemo... Some times when I edit the code I have to "Totally" recompile the TorqueDemo in order for the changes to take effect... (do not use BuildTorqeDemo use ReBuildTorqueDemo)
#14
08/28/2004 (5:18 pm)
Sorry, my fault all along... I spelt environment wrong in the script.

Sorry for any trouble caused :(


Silly me!
#15
08/28/2004 (5:29 pm)
No prob I am the werst spellar in the warld....:)
#16
08/29/2004 (11:15 am)
All make mistakes :)
Hope it works now Joseph !
#17
08/29/2004 (11:25 am)
Yeah works great, thanks Billy!
#18
08/31/2004 (5:32 am)
Thanks Billy, this is very clean and usefull!

Nick
#19
09/02/2004 (6:20 am)
Good stuff in this thread, always love to see people helping each other out with tutorials and learning material. Cool stuff all. :) *spreads the love, but not in a gross way*
#20
11/30/2004 (10:46 am)
Used this code and it crashes my game loading objects everytime. I just downloaded torque from my garage two days ago. From reading the boards it would seem very obvious i am not alone. Does anyone have a zip of working rain demo i can look at? Or some advice?
Page «Previous 1 2