Show Posts

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.


Messages - Red_Guy

Pages: [1] 2 3 4 5 6 ... 19
1
Help / Re: Ownership Saving Issue
« on: October 01, 2012, 07:08:37 PM »
Bumb, can I please get some help on this?
the save / load is working as intended.

When you build on top of somebody else's bricks, the ownership changes when you re-load them.

So theres nothing to fix.

2
or create your own gamemode

just add:
$MiniGame::Enabled 1

to the gamemode.txt file

Then start your dedicated server with:   -dedicated -gamemode NameOfYourGameMode

The minigame will auto start when the server starts, and stay when you log out.

3
Modification Help / Re: Clearing only a type of brick
« on: September 30, 2012, 03:49:54 PM »
Code: [Select]
%mct = MainBrickGroup.getCount();
for(%i = 0; %i < %mct; %i++)
{
%obj = MainBrickGroup.getObject(%i);
if(!%oct = %obj.getCount())
continue;
for(%x = 0; %x < %oct; %x++)
{
%b = %obj.getObject(%x);
if(%b.getDatablock().isTrenchDirt)
%b.delete();
}
}

One of the basic programming practices (applies to ALL languages) -- dont delete stuff from a list when your looping over it.
Try something like this instead:
Code: [Select]
%mct = MainBrickGroup.getCount();
for (%i = 0; %i < MainBrickGroup.getCount(); %i++)
  {
   %obj = MainBrickGroup.getObject(%i);
   %toDelete = new SimSet();
   for (%x = 0; %x < %obj.getCount(); %x++)
     {
      %b = %obj.getObject(%x);
      if (%b.getDatablock().isTrenchDirt)
        %toDelete.add(%b);
     }

   while (%toDelete.getCount() > 0)
     %toDelete.getObject(0).delete();
}

the funky while loop is because if you just do this:
for (%a=0; %toDelete.getCount(); %a++)
  {
   %obj = %toDelete.getObject(%a);
   %obj.delete();
  }

You will get the same errors - this is because when you delete an object, torque is smart enough to delete objects from any lists they are in. 

4
Help / Re: How much RAM does one player use?
« on: September 28, 2012, 04:10:50 PM »
depends how powerful the CPU is ..
and it depends on what the people are doing

32 people chatting .. not much at all
32 people in a 16x16 TDM = high cpu usage

or ... 31 people chatting and 1 person exploiting events = high cpu usage

5
a dedicated server isnt supposed to use a gui

what happens when you try to start one in ubuntu ?

6
Modification Help / Re: Help with Toggle Keybinds + client chat messages
« on: September 26, 2012, 07:21:36 PM »
keybind functions take an argument.  The value will be 0 or 1.  I forget which one is which (im not at home right now).
but you use the argument to determine what to do

so you will want something like this:
Code: [Select]
function client_svdll(%arg)
  {
    if (%arg = <something> ...

7
Help / Re: Blockland Crashes every time.
« on: September 26, 2012, 02:56:44 PM »
some suggestions

your log shows:
Code: [Select]
Error opening zip (Add-Ons/GameMode_Ninja_Jump_#726153.zip), need to handle this better...
Error opening zip (Add-Ons/Gamemode_Slayer_Boun#626C44.zip), need to handle this better...
delete these 2 zip files from your addons folder

Next, it seems blockland is having problems trying to set fullscreen mode.  So as a test find the file blockland/config/server/prefs.cs  and MOVE it somewhere else.
That will cause blockland to use its default settings -- which is windowed mode.

no guarantees either of those will fix your problem - but it cant hurt to try.

8
it works like this:

server side
function serverCmdMyMessage(%client, %arg1)
  {
   code goes here
  }

client side
%testvariable = <some value>
commandToServer('MyMessage', %testvariable);

9
Try this
Code: [Select]
function serverCmdBuy(%client,%image)
{
     if (%image $= "Gun")
     {
      buyThing(%client, GunItem);
     }
}

function buyThing(%client, %thing)
  {
   %slot = -1;
   %item = %thing.getID();
   for (%x=0; %x <= 4; %x++)
     {
      if (%client.player.tool[%x]==0)
        %slot = %x;

      if (%client.player.tool[%x] == %item)
        {
         MessageClient(%client, '', "You already have a " @ %thing.uiName);
         return;
        }
     }
   if (%slot == -1)
     {
      MessageClient(%client, '', "Inventory full");
      return;
     }
   %client.player.tool[%slot] = %item;
   MessageClient(%client, 'MsgItemPickup', '', %slot, %item);
  }
(code ripped from my mining server and tweaked a little)

you can use "buyThing" to add any item to your player inventory if you know the "Item" datablock name.

10
Gallery / Re: Minecraft Brick Generator
« on: September 25, 2012, 04:31:40 PM »
yes
but you didn't write the script to the generator.
you used terragen if I remember correctly.
Then you just make some little script to convert the heightmap and do colors.
Correct.

but the little script also combines bricks together to keep the overall brick count down to a reasonable level.

11
Gallery / Re: Minecraft Brick Generator
« on: September 25, 2012, 04:11:57 PM »
you want something like this?
http://www.mediafire.com/file/3ldpe2eqtynns97/Terrain_256.zip

some save files of terrains I generated.

12
Help / Re: How To Host Dedicated Server?
« on: September 24, 2012, 01:06:41 PM »
do this:

(assuming your running windows)
Find your blockland shortcut - make a copy of it, and put it on your desktop.
right click the shortcut, pick 'properties'

find the 'Target' box near the top, and add (at the END of the text):   -dedicated
You will probably want a game mode too, so also add -gamemode <nameOfYourGameModeHere>

so when your done it looks something like this:
...(stuff).../BlocklandLauncher.exe" -dedicated -gamemode freebuild

Click 'ok'

now start the dedicated server -- you should see a dos window open.  and it should stay open.

Next Join your dedicated server -- start blockland like normal.  pick 'join game' and you should see your server in the list.  if you dont see it, pick 'Query LAN'  and you should see it there.

13
Modification Help / Re: How would I create an object inside another object?
« on: September 24, 2012, 12:22:16 PM »
It sounds like you want something like this:
Code: [Select]

%obj = new scriptObject(tank)
{
       var1 = 40;
       var2 = 20;
};
tank.build();
tank.kill();
tank.print();

function tank::kill()
{
       (coding here)
}

function tank::setup(%this)
  {
   %tread = new ScriptObject(Tread);
   %tread.setup();
   %turret = new ScriptObject(Turret);
   %turret.setup();
  }
function tank::print(%this)
  {
   echo("tank: " @ %this);
   echo("tank treads: " @ %this.tread);
   echo("tank turret: " @ %this.turret);
  }


function tread::setup(%this)
  {
   (coding here)
  }

function Turret::setup(%this)
   {
    (coding here)
   }

14
Help / Re: Unlimited Mining question
« on: September 21, 2012, 04:14:49 PM »
To start the server automagicly ....

1) create/edit the file config/server/MiningStats.cs
2) add this to the end of the file:
$Dig_Stats_Saved_Autoexec = 1;

3) start blockland in dedicated mode:
blocklandlauncher -dedicated -gamemode UnlimitedMining ......

After loading everything, it will pause for 15 seconds before doing a "/startdig"

Now if you want it to auto restart -- here is a copy of my .bat file I use
Code: [Select]
:top
del config\server\restartnow.txt
echo $Dig_Stats_SavedAutoexec = 1; >> D:\games\Blockland\config\server\MiningStats.cs
del last_console.log
ren console.log last_console.log

blocklandLauncher -dedicated -gamemode UnlimitedMining -profilePath "D:\games\blockland"
Date /T
TIME /T
:again
timeout 300
if exist config\server\restartnow.txt goto top
goto again

You will need to edit the path names to suit where your copy of blockland is installed

15
Development / Re: 2012/09/12 - Steam Greenlight
« on: September 14, 2012, 04:14:04 PM »
Vote + comment added.

I hope this goes through.

Pages: [1] 2 3 4 5 6 ... 19