Author Topic: Hammer that doesn't do damage?  (Read 1209 times)

I need a hammer that doesn't do damage to other players, but it can still break bricks.

where is the script for the hammer anyway? I can't find it

where is the script for the hammer anyway? I can't find it
It's not accessible like the brick tool, printer, wrench and paint can

You CAN however type DATABLOCKNAME.save("Add-Ons/FILENAME.cs"); into the console, for example, hammerItem.save("Add-Ons/hammerItem.cs"); will export the Hammer's item datablock to your Add-Ons folder

hammerProjectile.directDamage = 0;

I actually need one that's exactly the opposite.
Does damage but doesn't destroy bricks and doesn't show outlines.
Basically a weapon version.

I actually need one that's exactly the opposite.
Does damage but doesn't destroy bricks and doesn't show outlines.
Basically a weapon version.
That's pretty easy, though the hammer only does 10 damage

hammerProjectile.directDamage = 0;
Just plop this in server.cs, whip up a description.txt, and package it into an add on. Bam.

We need a Hammereditor in here.

Just plop this in server.cs, whip up a description.txt, and package it into an add on. Bam.
a what now
I actually need one that's exactly the opposite.
Does damage but doesn't destroy bricks and doesn't show outlines.
Basically a weapon version.
that's a really bad idea, because people can rapidfire with the hammer. maybe make it so they can't?

that's a really bad idea, because people can rapidfire with the hammer. maybe make it so they can't?
It would be a weapon, like the Sword or something, so it wouldn't be able to rapid fire like the tools

Just plop this in server.cs, whip up a description.txt, and package it into an add on. Bam.
Or rather, make it a pref or something so that it can be toggled without restarting the server, and also give it a notification so that players know

It would be a weapon, like the Sword or something, so it wouldn't be able to rapid fire like the tools

You can rapid fire with some weapons. The only reason you cant with most of them is because they have a start-up time, and few have scripted prevention to forcefully stop the projectile being fired. You can delay the rapid-fire code, and it would work with weapons, its just pointless because its usually faster just to click spam.

I believe if you put
hammerProjectile.directDamage = 0;
into Config/Server/prefs.cs it should be able to activate it as well, not so sure, but I believe badspot puts it as exec("config/server/prefs.cs");

I believe if you putinto Config/Server/prefs.cs it should be able to activate it as well, not so sure, but I believe badspot puts it as exec("config/server/prefs.cs");
That will be overwritten when the server saves prefs. You should make it a new add-on, or just put it in console directly for one time usage.

so uh... is someone going to make this? because I have no idea how to package addons.

so uh... is someone going to make this? because I have no idea how to package addons.
Just plop this in server.cs, whip up a description.txt, and package it into an add on. Bam.
Seriously, just open any addon and you'll notice that anything in server.cs gets executed on server startup. Put the command in there and edit description.txt. PM me I'd you have any trouble.