generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Clearing water (terrain)

Previous Thread :: Next Thread 
imnotaguestimagirl is not online. imnotaguestimagirl
Joined: 21 Nov 2010
Total Posts: 8159
26 Oct 2012 04:46 PM
I have no idea how to even begin going about this. Any assistance please?
Report Abuse
imnotaguestimagirl is not online. imnotaguestimagirl
Joined: 21 Nov 2010
Total Posts: 8159
26 Oct 2012 04:49 PM
I should probably clarify, I only want to clear Water from it. I do not want to clear all of the terrain.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
26 Oct 2012 04:51 PM
game.Workspace.Terrain:Clear()
Report Abuse
imnotaguestimagirl is not online. imnotaguestimagirl
Joined: 21 Nov 2010
Total Posts: 8159
26 Oct 2012 04:52 PM
Thanks for reading my second post, Fedorakid.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
26 Oct 2012 04:52 PM
Alittle late :P
Report Abuse
TNTxERIC is not online. TNTxERIC
Joined: 20 Nov 2010
Total Posts: 2689
26 Oct 2012 04:53 PM
http://wiki.roblox.com/index.php/RBX.lua.Terrain_%28Object%29

I see GetWaterCell, clear, and destroy; play with that.
Report Abuse
TNTxERIC is not online. TNTxERIC
Joined: 20 Nov 2010
Total Posts: 2689
26 Oct 2012 04:55 PM
I'm guessing it would be something like this:

water = game.Workspace.Terrain:GetWaterCell

water:Destroy()

or

water = game.Workspace.Terrain:GetWaterCell

water:Destroy()

Report Abuse
TNTxERIC is not online. TNTxERIC
Joined: 20 Nov 2010
Total Posts: 2689
26 Oct 2012 04:57 PM
Sorry I mean:

or

water = game.Workspace.Terrain:GetWaterCell

water:Clear()
Report Abuse
imnotaguestimagirl is not online. imnotaguestimagirl
Joined: 21 Nov 2010
Total Posts: 8159
26 Oct 2012 04:59 PM
Neither works, and Output doesn't provide any errors at all.
Report Abuse
TNTxERIC is not online. TNTxERIC
Joined: 20 Nov 2010
Total Posts: 2689
26 Oct 2012 04:59 PM
Sorry you need parentheses for GetWaterCell

water = game.Workspace.Terrain:GetWaterCell()

water:Destroy()
Report Abuse
imnotaguestimagirl is not online. imnotaguestimagirl
Joined: 21 Nov 2010
Total Posts: 8159
26 Oct 2012 05:01 PM
GetWaterCell(int x, int y, int z)

(object browser)

Requires the coordinates... using it without arguments doesn't work
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
26 Oct 2012 05:09 PM
Is water it's own model?
Report Abuse
imnotaguestimagirl is not online. imnotaguestimagirl
Joined: 21 Nov 2010
Total Posts: 8159
26 Oct 2012 05:15 PM
We may have encountered another new issue. Doesn't look like :GetWaterCell is gonna work:

Tuple GetWaterCell(int x, int y, int z)
Member of Terrain
Preliminary: This item is under development and is likely to change. Use only for experimental work.

Roblox Preliminary: This item is under development and is currently restricted for use by Roblox Admins only.

Deprecated: This item is deprecated. Do not use it for new work.

Summary:
Returns hasAnyWater, WaterForce, WaterDirection


Got an ugly Roblox Preliminary on it.
Report Abuse
TNTxERIC is not online. TNTxERIC
Joined: 20 Nov 2010
Total Posts: 2689
26 Oct 2012 05:19 PM
Well the only thing you can do is wait then. It's still under development. I can't think of any other way.

-http://www.roblox.com/TNTxERIC-item?id=88273188-
Report Abuse
gijsbel11 is not online. gijsbel11
Joined: 07 Feb 2009
Total Posts: 4223
26 Oct 2012 05:31 PM
maybe by going trough all the cells and use

http://wiki.roblox.com/index.php/GetCell_(Method)

to check if it's water, if it's water then you can use :

http://wiki.roblox.com/index.php/SetCell_(Method)
http://wiki.roblox.com/index.php/SetCells_(Method)

to set it to 'air'

If you need to know how big the terrain is for the for loops that go trough the terrain cells just use the .size property.

Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image