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

Pages: 1 ... 1541 1542 1543 1544 1545 [1546] 1547 1548 1549 1550 1551 ... 1599
23176
Modification Help / Re: Giving a projectile constant AoE?
« on: April 11, 2012, 06:40:15 PM »
Not sure which would be worse, looping through every client in the server and checking distance every so often, or doing a container search every so often.
This script is so simple, it would take doing it 1000 times a second to make a noticable difference in performance.

23177
Modification Help / Re: Giving a projectile constant AoE?
« on: April 11, 2012, 06:23:23 PM »
I made this a while back to make a projectile explode if a player was within a certain radius of it.
I fixed it up a bit as it was messy before, just replace (imagenamehere) with the weapons imagename, and it *should* work fine.

the 5 / in lines 9 and 26 is how many seconds you want it to check for a player within a certain radius. For example, the 5 would make it check for 5 seconds. Feel free to change that if you want.

$Pref::Server::ExpSamples is how many times within that time frame that it will check for a player within the given radius, it's set to 50 by default, you shouldn't need to set it much, or any higher than that.

$Pref::Server::ExplodeDistance is the radius to check for. If a player is within this radius of the projectile, it will explode. It's set to 3 by default. This can be set to anything that isn't negative, really.

I'm sure you can adapt that to work with just damaging people, rather than exploding the projectile, but it's very close to what you wanted.

The code:
Code: [Select]
$Pref::Server::ExpSamples = 50;
$Pref::Server::ExplodeDistance = 3;

function (imagenamehere)::onFire(%this, %obj, %slot)
{
if(%obj.getDamagePercent() < 1.0)
%obj.playThread(2, shiftAway);
%projectile = parent::onFire(%this,%obj,%slot);
%c = 5 / $Pref::Server::ExpSamples * 1000;
schedule(%c+500, 0, "rpl_doExpCheck", %projectile, "1");
}

function rpl_doExpCheck(%proj, %checknum)
{
if(!isObject(%proj))
return;
for(%a = 0; %a < ClientGroup.getCount(); %a++)
{
%player = ClientGroup.getObject(%a).player;
if(vectorDist(%player.position, %proj.position) < $Pref::Server::ExplodeDistance)
{
%proj.explode();
return;
}
}
schedule(5 / $Pref::Server::ExpSamples * 1000 + 500, 0, "rpl_doExpCheck", %proj, %checknum + 1);
}

23178
Add-Ons / Re: NARG: TMBI Beta is out. Hey look a video...
« on: April 10, 2012, 06:12:24 PM »
A couple of glitches to report here:

1. Moving the bricks window causes lag.
2. some of the GUI elements in the brick menu overlap into the brick inventory. (I'll post a pic of it in a few minutes to show you what i mean, it's kinda hard to explain.)

23179
Help / Re: Dedicated server launcher enables all addons?
« on: April 09, 2012, 05:07:36 PM »
Thank you honor! That worked perfectly. Problem solved!

23180
Help / Re: How do I use buildbot?
« on: April 09, 2012, 05:03:47 PM »
I think this is an appropriate time to point out the incredibly obvious:


PS:
don't bump ANY topic that's on the front page. That's spam.
And the fact you did it in huge font makes that even more so.

23181
Help / Re: Dedicated server launcher enables all addons?
« on: April 08, 2012, 07:15:23 PM »
I tried doing those exact steps, except with an online server. Diddn't work.

23182
Help / Re: Dedicated server launcher enables all addons?
« on: April 08, 2012, 07:09:54 PM »
Well whenever I start the dedicated server, it starts loading every single addon that I have. When i check the addonlist, it has enabled every single one.

23183
General Discussion / Re: Glass' Trench Wars [OFFICIAL TOPIC]
« on: April 08, 2012, 07:06:22 PM »
we don't need reloading, it's too damn realistic
You do realize what you just said, right?
Why would you complain about something in a game being too realistic.

23184
General Discussion / Re: Best Players of Blockland
« on: April 08, 2012, 07:03:38 PM »
[sarcasm]
OP - for creating a topic that is 100% beneficiary to the community.
[/sarcasm]

These kinds of threads never go down well.

It's literally a thread about judging people.

23185
Help / Re: Dedicated server launcher enables all addons?
« on: April 08, 2012, 06:52:45 PM »
Go to myDocuments/Blockland/config/server/addonlist.txt
its actually ADD_ON_LIST.cs, and it is there.

23186
Help / Dedicated server launcher enables all addons?
« on: April 08, 2012, 04:22:05 PM »
Whenever I try to start a dedicated server, all my addons get enabled for some reason, whether or not they were enabled before.
I searched for this problem, but found nothing.

23187
Add-Ons / Re: NARG: TMBI Beta is out. Hey look a video...
« on: April 07, 2012, 09:30:19 PM »
You have the most impossible errors.
Yes, especially the one I just sent you by PM. It really happened. It's seriously confusing me, and is quite annoying.

23188
Modification Help / Re: messageclient(); does not work?
« on: April 07, 2012, 09:26:04 PM »
Use gameConnection::onClientEnterGame.
But parent it, and package it.

23189
Modification Help / Re: Spawn brick aligned to grid help
« on: April 07, 2012, 01:52:40 PM »
Bricks automatically align themselves to the brickgrid. If I told torque to plant a 4x cube at "440.564 525.64 467.367", a new 4x cube would appear at "440.5 525.5 467.4"
I thought torque rounded it to the nearest .5 ... But yes, it does automatically allign to the grid.

23190
Found a glitch 2 minutes after installing the mod, cause not been found yet, but a sort of fix has been.
Butt has moved.

Pages: 1 ... 1541 1542 1543 1544 1545 [1546] 1547 1548 1549 1550 1551 ... 1599