Adding Precipitation Effects
by William Goh (Joondalup IT TAFE) · in Game Design and Creative Issues · 04/21/2009 (3:54 am) · 8 replies
Hi, I need help to adding a Precipitation effect and how to change particle effects of the crossbow for TGEA_1_7_1 or TGEA_1_8_1 can anyone help? Some script files needs to be changed and stuff like that.
#2
For the crossbow particles, check your crossbow.cs file, all of the particle information is in there. Just tweak away until you get what you want. Good luck!
04/21/2009 (9:30 am)
What kind of help do you need with the precipitation effect? There are a couple of missions included with the Stronghold demo that will give you excellent examples of rain and snow. You can copy those over into your mission file, or just create a new precipitation block via the world creator.For the crossbow particles, check your crossbow.cs file, all of the particle information is in there. Just tweak away until you get what you want. Good luck!
#3
04/21/2009 (9:54 am)
From Torque 101: Intro to TorqueQuote:more...
Let's add some weather patterns to our game.
This is from the TDN tdn.garagegames.com/wiki/WorldBuilding/MissionEditor/Adding_Precipitation#Introd...
We start by creating a new .cs file in the server/scripts directory. My new file is called environments.cs
Open Environment.cs using notepad. Create a new precipitation datablock as follows
datablock PrecipitationData(gentleRain)
{
dropTexture = "~/data/enviroment/gentleRainDrop";
splashTexture = "~/data/enviroment/gentleRainSplash";
dropSize = 1;
// splashSize = 0.1; // I commented out this line, since I don't have a good image for it.
useTrueBillboards = false;
splashMS = 250;
};
#4
more...
04/21/2009 (9:55 am)
Quote:
gentleRainDrop and gentleRainSplash are image files located in the environment folder located in the GameOnedata directory. If you don't have an environment folder, go ahead and create one. If you don't have gentleRainDrop.jpg or gentleRainSplash.png (either .jpg or .png is acceptible) then you can create one or find one online. Just make sure they are 32x32 (or another power of 2) in size. If any of this is confusing, let me know. I think everyone who has followed the GettingStarted.pdf understands about images/graphics, but if not, I'll try to help.
dropSize and splashSize are self explanitory. I think useTrueBillboards determines how the images are facing. I think a Billboard is always facing the camera, so it doesn't have sides or a back, just a front facing the camera. I could be wrong. The tutorial has it set as false so I'll leave it that way. And I think splashMS is the speed of the splash effect.
Save the environment.cs file
Open game.cs (in the server directory) and add the exec line. Remember, it goes in the function onServerCreated()
as follows
exec("./Scripts/environment.cs");
more...
#5
more...
04/21/2009 (9:57 am)
Quote:
Save game.cs
Open GameOneMission.mis I'm going to stop listing the directory of everything. I think you can find the files at this point. If you want me to continue listing full diurectories, I will, but I don't think it's needed anymore. We're no longer totalNewbies, we're more like stillNewbies.
So open GameOneMission.mis (in the data folder). At the bottom, just before the last }; type in this
new Precipitation(rain) {
position = "0 0 0"; //Doesn't matter where it goes
rotation = "1 0 0 0"; //Doesn't matter either
scale = "1 1 1";
nameTag = "Rain"; //Give it a name
dataBlock = "gentleRain"; //Use the datablock that we created earlier
minSpeed = "12"; //How Slow?
maxSpeed = "19"; // How fast?
minMass = "0.05"; //How small?
maxMass = "2"; //How Big?
maxTurbulence = "0.1"; //How turbulent?
turbulenceSpeed = "0.2";
rotateWithCamVel = "1"; // Do you want the precipitation to always face the camera?
useTurbulence = "1";
numDrops = "200"; // How many drops should be seen at once? Be careful with this one!
boxWidth = "30";
boxHeight = "50";
doCollision = "1"; //Want the precipitation to go through interiors?
};
more...
#6
more...
04/21/2009 (9:59 am)
Quote:
I'm not sure how doCollision works, but set at 0, there is no collision andrain falls through interiors. Set at 1, a little rain still leaks into my tavern. It must be my DIF. It is just a little rain, and it's only my tavern that leaks. My houses do not. Great. My tavern has a leaky roof. Pretty realistic, I guess.
more...
#7
www.garagegames.com/community/forums/viewthread/51854
Third page (post dated 11-03-2006).
Hope it helps.
Tony
04/21/2009 (10:01 am)
Too long to post... Here's a link...www.garagegames.com/community/forums/viewthread/51854
Third page (post dated 11-03-2006).
Hope it helps.
Tony
#8
Sorry, forgot to add im using SFX and 1.8.1
04/21/2009 (3:38 pm)
hey guys, this is a question for you. If i wanted to add say a Gusty wind to a my rain sound.. on top of say a global sound.. what would i use. Which sound effect would work best. A link would be good. Is there a list somewhere?Sorry, forgot to add im using SFX and 1.8.1
William Goh (Joondalup IT TAFE)