2DWorlds Forums
Help with Generating Terrain using a tool. - Printable Version

+- 2DWorlds Forums (http://2dworlds.buildism.net/forum)
+-- Forum: 2DWorlds (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=4)
+--- Forum: Scripting (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=13)
+--- Thread: Help with Generating Terrain using a tool. (/showthread.php?tid=6681)



Help with Generating Terrain using a tool. - Login - 07-08-2011

The function to make terrain generate (you have to put terrain and place it somewhere first) then you paste this command into the Scripting Console: game.Terrain:generate()

If you would, could you make a tool that when you left click, the terrain does exactly what it would in scripting console?

Thanks in advance!


RE: Help with Generating Terrain using a tool. - Nyht - 07-17-2011

I will try to script this as soon as I get my comp. back.
I have the script, already, but it is untested.


RE: Help with Generating Terrain using a tool. - Blandflakes - 07-17-2011

Hmm.. I tried it but it only randomly creates terrain each click :/


RE: Help with Generating Terrain using a tool. - Nyht - 07-17-2011

(07-08-2011, 06:55 PM)Login Wrote: The function to make terrain generate (you have to put terrain and place it somewhere first) then you paste this command into the Scripting Console: game.Terrain:generate()

Am I doing something wrong?


Says "generate is not a function, child or property of Terrain". Pleased Terrain's parent as both Root (game) and World, yet nothing happened. :|


RE: Help with Generating Terrain using a tool. - Blandflakes - 07-17-2011

(07-17-2011, 05:43 AM)Nyht Wrote:
(07-08-2011, 06:55 PM)Login Wrote: The function to make terrain generate (you have to put terrain and place it somewhere first) then you paste this command into the Scripting Console: game.Terrain:generate()

Am I doing something wrong?


Says "generate is not a function, child or property of Terrain". Pleased Terrain's parent as both Root (game) and World, yet nothing happened. :|

That happened to me. I just used the regular terrain tool and made a simple flat terrain.


RE: Help with Generating Terrain using a tool. - Login - 07-17-2011

You have to make some terrain first then use the terrain script to make it generate.


RE: Help with Generating Terrain using a tool. - Nyht - 07-19-2011

(07-17-2011, 12:36 PM)Login Wrote: You have to make some terrain first then use the terrain script to make it generate.

That makes more sense, lol.


RE: Help with Generating Terrain using a tool. - Login - 07-19-2011

(07-19-2011, 05:33 PM)Nyht Wrote:
(07-17-2011, 12:36 PM)Login Wrote: You have to make some terrain first then use the terrain script to make it generate.

That makes more sense, lol.

Do you think you can do the tool? :p