Creating Virtual Worlds
Section 1 - A single room$room = { texture => $txt->texture("blustn"), }; # line 1 $world = cell ( name => "Hello World", room => $room ); # line 2 $bunch = worldAsBunch ( 0, 0, 0, 32, 32, 16, $world); # line 3 Example 1 Thats it! You may wonder now, what has happened? And where are all the details? Okay, for the slow ones :o) We described a room in line 1, and the only thing we set was the texture, which is named 'blustn'. In line 2 we described our world, gave it a name and said it should use the room described earlier. The call cell() will fill in any parameters we left with good default values. In line 3 we constructed the world as a bunch, which contains all the gory brushes and objects from our world and can then be saved to a mission file. The wrapper will do the rest for us. In line 3 the 6 parameters are X,Y and Z of the world's center and its width, length and height. Just FYI, here is the output from the script:
VWorld Tutorial Wrapper v0.0.1 (C) Copyright by Tels 2000. All Rights Reserved.
Call as perl vtutorial.pl [section] where section is 1..x and defaults to 1. Reading tutorial section 1...
Hello World: 0 0 0 (32 32 16)
That's it! Load the mission into DromEd, type light_bright[Enter] in the lower right command window (since we haven't added any lights/lamps, and you would otherwise not see anything), then portalize, build the room database, and then hit [ALT]+[G] to go into Game Mode. Walk around and enjoy the empty space a bit. Now onto to some more complex things...
|