paste these in here http://maxogden.github.com/voxel-script-gun/
Last active
March 6, 2021 12:17
-
-
Save max-mapper/4629616 to your computer and use it in GitHub Desktop.
voxel script gun scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (var i = 0; i < 50; i++) { | |
var forward = new game.THREE.Vector3(0,0, -game.cubeSize * i) | |
var block = position.clone().addSelf(forward) | |
game.createBlock(block, 1) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var left = position.clone().addSelf(new game.THREE.Vector3(-game.cubeSize,0,0)) | |
var top = position.clone().addSelf(new game.THREE.Vector3(0,game.cubeSize,0)) | |
var right = position.clone().addSelf(new game.THREE.Vector3(0,0,game.cubeSize)) | |
game.createBlock(left, 1) | |
game.createBlock(top, 1) | |
game.createBlock(right, 1) |
// wall 10x10
for (var i = 0; i < 10; i++) {
for (var j = 0; j < 10; j++) {
var forward = new game.THREE.Vector3(0, game.cubeSize * j, -game.cubeSize * i)
var block = position.clone().addSelf(forward)
game.createBlock(block, 1)
}
}
// Left-click to create a random block. right-click to delete a block - based on codedread's comment
var mouseEvent = arguments[1];
var blocktype = (Math.floor(Math.random() * 10) % 3)+1;
if (mouseEvent.button == 2) {
game.setBlock(position, 0);
} else {
game.createBlock(position, blocktype);
}
How
Idk how to make
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
// plane 10x10
for (var i = 0; i < 10; i++) {
for (var j = 0; j < 10; j++) {
var forward = new game.THREE.Vector3(-game.cubeSize * j, 0, -game.cubeSize * i)
var block = position.clone().addSelf(forward)
game.createBlock(block, 1)
}
}