Mow a Meadow with Torque 3D

Hello Friends – here a little Tutorial on how to change the groundcover on the position of the player – so you can make an mow – effect – have fun (thanks to LukasPJ) 😉

First you have to Download the whole Torque 3D Sourcecodes (

Then get the Sourcecodes in Visual Studio -> look here:

Then we need to know, that we want to change the Groundcover on a specific position in the Game. Therefore we need to change the Terraintexture on this position and can then layer the Groundcover on it.

So we now make the file (we will name it) „mow.cs“ in the „scripts/server/“ folder of your game directory.

And we put the following in this file:

Here you can play around with the index of the ground materials – its the number here:

and with the interval to change the mow speed ground materials:

At the next step we need to add this script into the „scriptExec.cs“-File in the „scripts/server/” Folder of your Game Directory. Add this line somewhere in the file:

Now open the File „terrainEditor.cpp“ in Visual Studio and add this code somewhere in the file:

And add the header files in “terrainEditor.cpp”:

On the end of the other “.h” files at the top of the “terrainEditor.cpp” file.

Congratulations – now just compile and you have a working function to change the “TerrainTexture” at the Position from the Player!

Now let’s start your game after compiling it!

Okay – we want to change the groundcover on the position of the player – so we just need to layer some terrain material on the type of your groundcover.

The Settings for the Groundcover should be:

Further use your desired terrain texture, which is set as meadow – so only there the grass, would be.

And use “0” in our case as a TerrainTexture – this would be replaced and so there is a “mowing effect” because you layered it on another Texture 😉

Okay now you are ready!!!

Just open the console in the Terrain Painter Editor and type “start_mow” now just walk through your Groundcover and have look at this cool thing – if you want to stop “mowing” just use “stop_mow” 8)

So now this Tutorial is understand as an RFC Document – so you are welcome to send me your Comments.

Best Regards!