Author Topic: List Of Percipitation Datablocks  (Read 1101 times)

I have been searching over the forums (and my blockland folder) for the past few days looking for a Rain datablock or any other type of datablock that can be used for precipitation script, but none of them work.
Things I've tried:
  • RainA
  • RainB
  • WaterA
  • WaterB
  • TSwater1
  • BubbleA
  • BubbleB
  • Bubbles
I'm new to scripting so that is why I'm horrible. I would appreciate any help or a list of water type datablocks.

You also missed SnowA and  I think SnowB.

Blockland does not come with rain, only snow. You will have to make the rain yourself.

Register for a free account at garagegames.com and then read the following article:
http://tdn.garagegames.com/wiki/WorldBuilding/MissionEditor/Adding_Precipitation

Just a couple of corrections for Blockland. Enviroments.cs is probably hidden away in allGameScripts.cs.dso which you cannot edit. So instead create a folder in Add-Ons called Server_Rain. Copy the block they put in there into a new text file called rain.cs.

You will also need to create a file called server.cs. If you're in windows just associate the .cs file extension with notepad already if you haven't. Paste the following into server.cs and save it:

Code: [Select]
exec("./rain.cs");
Now create a file called description.txt. Paste the following into it and save it:

Code: [Select]
Title: Rain
Author: cool-cat
Some rain.

Also include in the folder a raindrop and splash texture. Instead of using "~/data/enviroment/myRainDrop" like the guide suggests, refer it to "./myraindrop". That just tells Torque to look inside of the folder it's already in (Add-ons/Server_Rain) for a file called myraindrop.

Then you would use whatever you named your precipitation datablock as the percipitation type in the editor. The default from the article is myRain.

Good luck finding some textures. You might be able to find some somewhere on garagegames.com. Or you could ask mocheeze if you could use the ones from the autumn pond map. You can always make your own as well.

-snip-
You just gave me the key to the universe of scripting. Thanks, Wedge.

However I but just one more question: When putting a texture and drop texture do i put the file in the Server_Rain or just put the name of it in the Rain.cs like so:
Code: [Select]
datablock PrecipitationData(Rain)
{
   dropTexture = "./rain";
   splashTexture = "./splashrain";
   dropSize = 10;
   splashSize = 0.1;
   useTrueBillboards = false;
   splashMS = 250;
};

To clear some confusion would this  be how my Sever_Rain file should look:

Rain.cs
Server.cs
Description.txt
rain.jpg
splashrain.jpg

Or do I leave out the drop and splash textures.

And would I put it in a script (this is bobandrobs) like this?

Code: [Select]
function serverCmdRain(%client, %amt) {
if(!%client.isAdmin)
return messageClient(%client, '', '\c6You need to be an admin to use this command.');
while(isObject(cloud))
cloud.delete();
%amt = mFloor(%amt);
if(%amt <= 0)
return messageClient(%client, '', '\c6It stopped raining.');
new precipitation(cloud) {
position = "0 0 600";
rotation = "1 0 0 0";
scale = "1 1 1";
nameTag = "Rain";
dataBlock= "Rain OR Server_Rain(which name do I use?)";
minSpeed = "0.5";
maxSpeed = "1";
minMass = "0.75";
maxMass = "0.85";
maxTurbulence = "0.1";
turbulenceSpeed = "0.2";
rotateWithCamVel = "1";
useTurbulence = "1";
numDrops = %amt;
boxWidth = "100";
boxHeight = "100";
doCollision = "1";
};
messageAll('', '\c6It\'s now raining at a rate of \c3%1\c6 raindrops per something!', %amt);
}
But every time I type /rain 100 i see nothing so I then look into the console and get this: Object 'Rain' is not a member of the 'GameBaseData' data block class
Add-Ons/Script_Rain/server.cs <27> : Register object failed for object cloud of class Precipitation.
« Last Edit: December 21, 2009, 09:22:30 PM by cool-cat »