CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 16 Jul 2015 09:32 PM |
So I'm kinda confused on how to script with terrain
How would I go about removing a certain voxel? like where to start?
Can someone give me some pointers, pseudo code, or some basic code :/ |
|
|
| Report Abuse |
|
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 16 Jul 2015 09:34 PM |
This page probably has some info you're looking for http://wiki.roblox.com/index.php?title=Smooth_terrain#Scripting |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 16 Jul 2015 10:18 PM |
yeah i skimmed through that and I didn't find a way to delete voxels :/ like if you were to "mine" them |
|
|
| Report Abuse |
|
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 16 Jul 2015 10:19 PM |
| There's a material type called "Air" that I saw when looking through the Material Enums, try setting it to that instead. |
|
|
| Report Abuse |
|
|
Casadis
|
  |
| Joined: 05 Aug 2013 |
| Total Posts: 115 |
|
|
| 16 Jul 2015 10:20 PM |
| I' guessing you could get the hit vector of your tool, then create a region3 there and then remove all voxels inside the region3. I've never done it before, but that's what I would look into. |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 16 Jul 2015 10:21 PM |
oo so air is like nothing
gotcha |
|
|
| Report Abuse |
|
|
vacha
|
  |
| Joined: 06 Jan 2011 |
| Total Posts: 1993 |
|
|
| 16 Jul 2015 10:22 PM |
From what I've read you should be able to set cells empty in a certain region. http://wiki.roblox.com/index.php?title=API:Class/Terrain/SetCells Setting empty http://wiki.roblox.com/index.php?title=API:Enum/CellMaterial
while true do the do |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 16 Jul 2015 10:25 PM |
| How would you get like a single voxel? |
|
|
| Report Abuse |
|
|
vacha
|
  |
| Joined: 06 Jan 2011 |
| Total Posts: 1993 |
|
|
| 16 Jul 2015 10:31 PM |
I guess you could convert a vector3 to a cell position. http://wiki.roblox.com/index.php?title=API:Class/Terrain/WorldToCell
Also you can find a plethora of functions and cool stuffx here: http://wiki.roblox.com/index.php?title=API:Class/Terrain
while true do the do |
|
|
| Report Abuse |
|
|