Thread

vb terrain edit (Sdk)

vb terrain edit // Sdk

1  |  

scuz

Dec 5, 2002, 3:43am
how do i edit terrain in vb agian, the post about that i cant see anymore

baron

Dec 5, 2002, 4:17am
If the post was removed from your local cache you'll have to reset the NG headers. Right click on the SDK NG/Properties/Local file/Reset, this will force OE to download headers again. You can also set OE to not remove old posts, Tools/Options/Maintenance/Uncheck the Delete news messages checkbox. Anyway I believe the post you are looking for is news://news.activeworlds.com/Xns92C6BD43B50A9kahatkahnewsdotcjbdo at 64.94.241.201

-Baron


[View Quote]

technozeus

Dec 9, 2002, 6:16am
In case that is the one, here is the section of code from it... streamlined a bit, but functionally equivilent.

Public Sub GenerateRandom()
PrevHeight = 0
For i = -50 To 50
For j = -50 To 50
HeightDifference = Int((251) * Rnd + 0)
RandomNum = Int((200) * Rnd + 1)
If RandomNum <= 100 Then
sdk.aw_terrain_heights(0) = PrevHeight + HeightDifference
Else
sdk.aw_terrain_heights(0) = PrevHeight - HeightDifference
End If
sdk.aw_terrain_set i, j, 1, 0
Next j
Next i
End Sub

Note: I didn't write this code, or for that matter even check to see if it works. I just copied and edited it.

TechnoZeus

[View Quote]

kah

Dec 10, 2002, 4:41pm
"technozeus" <TechnoZeus at techie.com> wrote in
news:3df45146$1 at server1.Activeworlds.com:

> In case that is the one, here is the section of code from it...
> streamlined a bit, but functionally equivilent.
><<snipped code>>
> Note: I didn't write this code, or for that matter even check to see
> if it works. I just copied and edited it.

I don't really recommend using it in it's current form, real uneffective
(as you'll discover if you run it).

KAH

technozeus

Dec 10, 2002, 8:42pm
That's kind of what I figured too when I looked at it. I thought about making a few changes to improve the smoothness or make it more "realistic" but decided to leave it alone since it should be easy to follow in this simple form. I stripped out some code that I felt would only make it harder to follow and not serve any direct purpose. I also thought about removing the PrevHeight variable since it has no effect with a value of zero, but decided to leave it there since the "average" terrain height can be set by changing it's value.

TechnoZeus


[View Quote]

1  |  
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2021. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn