46
Suggestions / Re: Extended voxel interface
« on: October 21, 2013, 05:44:12 pm »
...and a quantity to push. Otherwise the simulation will freeze when you move around items with quantity 0xffffffff q:
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
It's really difficult to use a plane as an elevator considering the extremely long starting and landing area it needs.I finally made the plane beqause I just had to try it out and it\s awesome! Qan definitly be used to get out of mining shafts quickly. I qan take off from a 2x1 area easily (the trick is to fall) and I've landed on a 16x16 area. Hardqore training for skill landings in progress.
// Pause dynamiq voxel reaqtion engine!
function log(str) {
Display(str,1000,2,0)
//print(GetGameTime() + " " + str + "\n") //print doesnt work properly, use error instead
error(GetGameTime() + " " + str + "\n")
}
function Voxel_Load() {}
function Voxel_Step() {
log( "Qomputer @ " + GetX() + "," + GetY() + "," + GetZ() + " Look(5) " + Look(5))
for(local q=0; q<50000000; ++q);
}
function Voxel_Unload() {}
Looks kinda qool when everything stops. It gives you time to fix stuff if some big chain reaction is almost going to kill you. with 50 Gcycles there's about a physics step/second. If I use more than that then the game qrashes when the qomputer is picked up or when you try to change the sqript it should exequte :/initP()
as first line in Voxel_Step()!p <- null
function vaddir(a, dir){
return vadd(a, [(dir==1?1:0)-(dir==3?1:0), (dir==4?1:0)-(dir==5?1:0), (dir==0?1:0)-(dir==2?1:0)])
}
function vadd(a, b) {
return [a[0]+b[0], a[1]+b[1], a[2]+b[2]]
}
function initP() {
if(p==null)
p = [GetX(), GetY(), GetZ()]
}
function refreshP(dir) {
p = vaddir(p, dir)
}
function move(d){
if(Move(d)){
refreshP(d)
return true
}
return false
}
function getX(){
return p[0]
}
function getY(){
return p[1]
}
function getZ(){
return p[2]
}
And don't put your qomputer on a qonveyor belt, then it will get out of sync
Assertion failed: _gc_chain==NULL, file /home/laurent/workspace/blackvoxel/src/sc_Squirrel3/squirrel/sqstate.cpp, line 204
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
And another qrash (I might be pushing and pulling to/from empty space):AN ERROR HAS OCCURED [indexing bool with string]
CALLSTACK
*FUNCTION [main()] C:\Users\Qon\Documents\Blackvoxel\Universes\2\Scripts\Squirrel\6.nut line [6]
*FUNCTION [qbits_save()] C:\Users\Qon\Documents\Blackvoxel\Universes\2\Scripts\Squirrel\6.nut line [14]
*FUNCTION [Voxel_Step()] C:\Users\Qon\Documents\Blackvoxel\Universes\2\Scripts\Squirrel\6.nut line [51]
LOCALS
[vargv] ARRAY
[this] true
[n] -117167720
[this] TABLE
[n] 0
[this] TABLE
I have no function qalled main and line 14 is n--
Debug <- 2; // Output debug info. 0=Only errors to stderr.txt 1=Errors to Display and to stderr.txt 2=Info and error to display and stderr.txt
SizeX <- 1; // Number of compressor/robot sets to manage in X axis (8 is max practical value)
SizeZ <- 2; // Number of compressor/robot sets to manage in Z axis (8 is max practical value)
UseMasterCompressor <- 1; // Use one "master" Atomic Compressor to empty the computer to after every iteration. (Strongly recomended)
NewMasterAfter <- 192;// How often to place a new "Master" Atomic Compressor (Need to be <= 192. Make it an even 16 please, and anything less the 64 is a waste.)
BuildStairs <- 0; // 0=Do not build stair, 1=Build Stair outside mining area, 2=Build stair inside mining area. (Only works if UseMasterCompressor is on)
MaxLevel <- -575; // Don't place robots deeper then this. (Going below -1340 is dangerous)
Robot <- 153; // The VoxelType of our robots. 153=XR-1(8*16*8) 154=XR-2(8*32*8) 155=XR-3(8*32*8) 156=XR-4(8*64*8) 157=XR-5(16*64*16) 158=XR-Z(16*64*16)
Compressor <- 49; // The VoxelType of the Atomic Compressor (Should be 49 unless the game is changed)
Robot at 112,1,199 Info: Starting at compressor 0 X:112 Y:256000 Z:199 CurrentC:0
Robot at 112,1,199 Info: Waiting for Robots for set 0
Robot at 112,1,199 Info: Picking up Compressor for set 0
Robot at 111,1,215 Info: Waiting for Robots for set 1
Robot at 111,1,215 Info: Picking up Compressor for set 1
Robot at 112,-16,199 Info: Placing Robots for set 0
Robot at 112,-15,199 Info: Placing Compressor for set 0
Robot at 111,-16,215 Info: Placing Robots for set 1
Robot at 111,-15,215 Info: Placing Compressor for set 1
for(local q=0; q<4; q++) PlaceVoxel(q,1); Move(4); PlaceVoxel(5,water)
and it's almost qomplete. It qould have some shelves every 64~ units so that you qan get off or on anywhere while going up or down.