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 - phflack

Pages: 1 ... 186 187 188 189 190 [191] 192 193 194 195 196 ... 920
2851
Suggestions & Requests / Re: An addon to clear certain bricks
« on: August 02, 2015, 09:34:30 PM »
I think this should work: https://drive.google.com/file/d/0B0FSY34ysJEXN2lqZlNEYzZtaDA/view?usp=sharing

/clearbricktype - clears your own bricks that match the datablock of your ghost brick
/clearallbricktype - clears all matching bricks on the server based off of the datablock of your ghost brick

Code: [Select]
function serverCmdClearBrickType(%client)
{
if(!isObject(%client.player) || !isObject(%client.brickGroup) || !isObject(%client.player.tempBrick))
{
messageClient(%client, '', "<color:ffffff>To clear all bricks of a type, you need a ghost brick of the type you wish to clear.");
return;
}
%datablock = %client.player.tempBrick.dataBlock;
%count = 0;
for(%i = %client.brickGroup.getCount() - 1; %i >= 0; %i--)
if(%client.brickGroup.getObject(%i).dataBlock $= %datablock)
{
%client.brickGroup.getObject(%i).delete();
%count++;
}
if(%count == 1)
messageClient(%client, '', "<color:ffffff>1 brick of type" SPC %datablock SPC "have been cleared.");
else
messageClient(%client, '', "<color:ffffff>" @ %count SPC "bricks of type" SPC %datablock SPC "have been cleared.");
}

function serverCmdClearAllBrickType(%client)
{
if(!%client.isAdmin || !isObject(%client.player) || !isObject(%client.brickGroup) || !isObject(%client.player.tempBrick))
{
messageClient(%client, '', "<color:ffffff>To clear all bricks of a type, you must be an admin and need a ghost brick of the type you wish to clear.");
return;
}
%datablock = %client.player.tempBrick.dataBlock;
%count = 0;
for(%j = 0; %j < mainBrickGroup.getCount(); %j++)
{
%brickGroup = mainBrickGroup.getObject(%j);
for(%i = %brickGroup.getCount() - 1; %i >= 0; %i--)
if(%brickGroup.getObject(%i).dataBlock $= %datablock)
{
%brickGroup.getObject(%i).delete();
%count++;
}
}
if(%count == 1)
messageClient(%client, '', "<color:ffffff>1 brick of type" SPC %datablock SPC "have been cleared.");
else
messageClient(%client, '', "<color:ffffff>" @ %count SPC "bricks of type" SPC %datablock SPC "have been cleared.");
}
haven't been able to test the /clearallbricktype command

edit: oh, torque does support bool ? true : false syntax, was getting a syntax earlier and took it out, but it was actually being caused by issues with brick.datablock instead of brick.dataBlock

2852
Add-Ons / Re: Undo GUI [My Second Add-On]
« on: August 02, 2015, 08:22:40 PM »
ya what if you forget up and accidentally undo 70 times when you only needed to undo 69 times and your work is destroyed
use a macro, that way you can easily see how many times you're going back
ie macro 10 undos, then keep replaying the macro until you're near how far back you want to go

2853
Help / Re: Blockland crashes when clicking bricks
« on: August 02, 2015, 08:21:37 PM »
Ill go through disabling each addon one by one, and seeing which crashes first.
should do a binary search to find what's breaking it
enable half, see if it works, if it doesn't it's in that half, if it does work, it's in the other half
then split the suspected half in two and check those quarters, and so on

2854
Off Topic / Re: Bill Nye Reading Mean Tweets
« on: August 02, 2015, 08:18:53 PM »
that's amazing

I like the paint drying part

2855
General Discussion / Re: REQUESTING D&D PLAYERS
« on: August 02, 2015, 09:45:40 AM »
neato
will see if my D&D friend from college wants to join in

2856
Help / Re: Addon will not appear in the addon selection menu
« on: August 02, 2015, 09:42:47 AM »
show us a picture of it in the proper location and not showing up in the addons menu

2857
Suggestions & Requests / Re: Standalone environment loading
« on: August 02, 2015, 09:38:00 AM »
oh, no semicolons at the end of each line and no ='s to set the values
that's annoying, could almost have just used exec

instead it might just have to open the file, read each line and do something like eval(getWord(line, 0) SPC "=" SPC getSubStr(line, strLen(getWord(line, 0)) + 1, strLen(line) - strLen(getWord(line, 0)) - 1) @ ";");

i'm guessing there's probably an easier way to split the first word and the rest of the string
and it might be better to use a switch to set everything, instead of using eval

edit: getWords(line, 1) would probably work better
BL crashes when you get 0 or less words from getWords it seems

2858
Suggestions & Requests / Re: Standalone environment loading
« on: August 02, 2015, 09:08:49 AM »
what does the environment file look like?
it could be as simple as exec("add-ons/folder/filename.txt"); if that's the way they're formatted correctly

2859
General Discussion / Re: im new to the forums!
« on: August 02, 2015, 07:05:43 AM »
could you guys tell me how the forum works around here?
all these posts are from 2011 and such, its really confusing
if you look at recent threads, most of the posts will be from recent times
if you look at older threads, most of the posts will be from older times, like 2011

2860
Help / Re: I dont understand Velocity on the game, can I get some help?
« on: August 01, 2015, 07:34:45 PM »
https://en.wikipedia.org/wiki/Velocity
it's basically speed and a direction
speed is the change of position over time
position is where you are at in the world
time is linear based off of time..

2861
Modification Help / Re: Explosion that only adds vertical velocity
« on: August 01, 2015, 04:31:42 PM »
How do you find all the fields that can be used in explosionData?
you can use .dump(); to get a list of fields and methods of an object/type

2862
Add-Ons / Re: Undo GUI [My Second Add-On]
« on: August 01, 2015, 04:29:17 PM »
i find it's easier to just macro undoing something like 10 times, and using the macro 10 times, to undo 100 bricks

2863
Modification Help / Re: Explosion that only adds vertical velocity
« on: August 01, 2015, 04:24:18 AM »
looking at the RL's explosion code, I see
impulseRadius = 6;
impulseForce = 4000;

and in the projectile code I see
impactImpulse      = 1000;
verticalImpulse      = 1000;

but it doesn't seem like the explosion launches people upward, just outward
I know with radius impulses you can do things like this, and with zones, but there might be some unused fields in the explosions that could be set to do this similar to radius impulse on bricks

2864
Suggestions & Requests / Re: WWII Anti-Tank guns
« on: August 01, 2015, 02:09:38 AM »
to change the damage, you just need to open the .cs file containing most of the code, look for a value that says the damage, and change it

2865
Off Topic / Re: Come on, forums! Be faster!
« on: July 31, 2015, 10:08:16 PM »
MIA is the Miami airport.
EZE is Buenos Aires' airport.
JFK is New York's airport.
FRT is Frankfurt's airport.
KRW is Krakow's airport.
STR is Salta's airport (Regional).

I think you missed the point in how vague you were with the acronym
what stops us from thinking it's an international airport in Malaysia? or something like a mobile incognito airshow?
there wasn't much to go off of in your post

Pages: 1 ... 186 187 188 189 190 [191] 192 193 194 195 196 ... 920