[release][b]Installation[/b]
[url=http://www.garrysmod.org/downloads/?a=view&id=4484][img]http://www.garrysmod.org/img/?t=dll&id=4484[/img][/url]unzip in your garrysmod/addons folder
[/release]
[release][b]Features[/b]
[list]Left click make aimed prop unbreakable[/list]
[list]Right click restore aimed prop settings[/list]
[list]Make an entire contraption breakable/unbreakable in one click[/list]
[/release]
[release][b]Informations[/b]
[list]I didn't found anywhere a stool like that, that's why I decide to make one and release it[/list]
[list]I don't understand why I didn't found a stool like this, because it's very useful when we make contraption with wood.. :D[/list]
[list]Because I didn't find in the wiki how to easily script that, I used a little hack I found for [url=http://forums.facepunchstudios.com/showthread.php?t=268866]my prop protection[/url]. But like comments says in the garrysmod code.. welcome to gmod! :D[/list]
[list]Works perfectly with [url=http://forums.facepunchstudios.com/showthread.php?t=268866]Prop protection addon[/url][/list]
[list]Don't forget to rate it if you like it![/list]
[list]I'm [b][u]french[/u][/b], so rating me [b][u]awful spelling[/u][/b] is very easy, I try to do my best in english, remember that[/list]
[/release]
[release][b]Screenshot[/b]
[img]http://www.garrysmod.org.nyud.net:8080/img/dl/4484_1.jpg[/img]
[/release]
[release][b]Changelog[/b]
[u]Version 1.1[/u]
[list][Added] Extend to contrained objects[/list]
[list][Changed] Protection system (thanks Spoco)[/list]
[/release]
Nice, clean, simple and works like a treat. Well done.
This is especially useful to me as I have disabled the magnetise tool (as it too makes things unbreakable, albeit with a few nasty side effects) due to it breaking ULX's jail function.
Keep up the good work Chaussette.
awesome, really useful
Wow, looks cool. Now all we need is a stool that makes everything breakable. :D
[QUOTE=Mattman243]Wow, looks cool. Now all we need is a stool that makes everything breakable. :D[/QUOTE]
Hmm why not !
You give me an idea: I can add two buttons 'Make all entities unbreakable'
and 'Make all entities breakable' on the tool's panel.
But if i do that, i must keep the compatibility with my prop protection! :D
I'll think about that
Wow, awesome, thank you, that tool is pretty use full
Nice. A lot better than using magnetise for it, since magnetise removes all constraints from the prop.
Very useful.
Now i can build wooden cars without people killing them with nades.
There is still entities we can destroy: entities spawned by stools, like balloons but it's a bug from garrysmod and I reported it.
I've always used magnetize simply because there was no official stool for my needs. Thanks a bunch for this.
Well there is the health STool. You can make unbreakable props with that too.
I have a better way to make entities unbreakable, unignitable and unresponsive to explosions (Won't be moved by explosions. Bad in some cases though.). The way is to use filter_activator_name entity and the Negated flag.
I've been using this for a long time (even back in GMod 9):
[lua]
local function DamageFilter() --This function creates the entity
if DmgFilter then return end --Let's not create it twice
DmgFilter = ents.Create("filter_activator_name")
DmgFilter:SetKeyValue("targetname", "DmgFilter")
DmgFilter:SetKeyValue("negated", "1") --Negate it so, everything that would normally hurt, will not pass this filter
DmgFilter:Spawn()
print("DmgFilter entity created")
end
hook.Add("Initialize", "DamageFilter", DamageFilter) --This is so it will be created when the map starts
local function MakeInvincible(pl) --This makes an entity invincible
local Ent = pl:GetEyeTrace().Entity
if not Ent:IsValid() then return end
if not DmgFilter then DamageFilter() if not DmgFilter then return end end --In case it doesn't exist, attempt to create it
Ent:Fire("setdamagefilter", "DmgFilter", 0); --It's this simple, just make it use the filter entity we created
end
concommand.Add("invincible", MakeInvincible)
local function MakeUnInvincible(pl) --This makes an entity breakable again
local Ent = pl:GetEyeTrace().Entity
if not Ent:IsValid() then return end
if not DmgFilter then DamageFilter() if not DmgFilter then return end end
Ent:Fire("setdamagefilter", "", 0);
end
concommand.Add("uninvincible", MakeUnInvincible)
[/lua]
They will be only breakable by lasers (at least that was the case in GMod 9), and I think there might be a way around that using the other filter entities [URL]http://developer.valvesoftware.com/wiki/Filter[/URL].
They are also still ignitable by the ignite tool for some reason, but they won't be ignited by explosions.
This also works for balloons, so I think you should use my method.
Yes, but I just want to make props unbreakable, so if there is an explosion near, it's normal they move, but they don't break.
And even if the ignite tool works on entities unbreakable, you'll notice that the fire don't break them.
And I included an undo system with the right click. With your method, it's not possible, because even if [b]entity:SetKeyValue(..)[/b] exists, the function [b]entity:GetKeyValue(...)[/b] doesn't exists for the moment, so I can't restore exactly entity's previous settings..
Before I make this tool, i read the source sdk documentation to see if there is a simple way to make props unbreakable. that's why I used a little 'hack' to do that.
But on my prop protection script, entities are not responsible to explosions (if explosions are not caused by the owner, of course)
[QUOTE=Chaussette]
And even if the ignite tool works on entities unbreakable, you'll notice that the fire don't break them.[/QUOTE]
Yes I know that, and that's how it should to be. But if explosions ignited them, someone could cause lots of lag by igniting all of your props with dynamites or such.
[QUOTE=Chaussette]
And I included an undo system with the right click. With your method, it's not possible, because even if [b]entity:SetKeyValue(..)[/b] exists, the function [b]entity:GetKeyValue(...)[/b] doesn't exists for the moment, so I can't restore exactly entity's previous settings..[/QUOTE]
No keyvalues have been changed. With right-click you simply make the entity not use the damage filter entity, just like I did in my example code.
If there's even a better way, I want to know about it.
Okay, I'll try that!
Just pick the magnitise stool and set everything to 0, and the prop will be unbreakable.
[QUOTE=Mikalh]Just pick the magnitise stool and set everything to 0, and the prop will be unbreakable.[/QUOTE]
And, will also lose all constraints. So, what if you had a wooden car and you wanted to make it invincible? You couldn't, or the car would fall apart.
[QUOTE=Mattman243]Wow, looks cool. Now all we need is a stool that makes everything breakable. :D[/QUOTE]
I agree! Additionally (maybe as a separate tool) it would be neat to have a "Make all breakable" tool that makes everything constrained to an object breakable. Then we could make destructible contraptions easily :)
[QUOTE=sinoth]I agree! Additionally (maybe as a separate tool) it would be neat to have a "Make all breakable" tool that makes everything constrained to an object breakable. Then we could make destructible contraptions easily :)[/QUOTE]
Okay !
I'll do that for the next update! :D
you should have a slider where you can set how much weight it can take!
That would be cool
[QUOTE=Spoco]If there's even a better way, I want to know about it.[/QUOTE]
Right Click. This restores it back to it's max health and prevents unbreakable props from being targeted:
[lua]
local maxhealth = Entity:GetMaxHealth()
if math.Clamp(maxhealth, 1, 1000) == maxhealth then
Entity:Fire("sethealth", maxhealth, 0)
end
[/lua]
Left Click. Prevents unbreakable props from being targeted:
[lua]
local maxhealth = Entity:GetMaxHealth()
if math.Clamp(maxhealth, 1, 1000) == maxhealth then
Entity:Fire("sethealth", "99999", 0)
end
[/lua]
Wow I was just thinking about something like this last night and how I wished someone would make it.
Wow, its great! Lol to make an un brakeable wooden fort
Good job :D
now I can use the breakable things for unbreakeble situation where breakable things are not supposed to break in this situation.
My best english :D
J'habite aux pays-Bas
for the english:
I live in holland
Actually my question is does this mod work well with the various prop-protector mods and the undo menu?
Because you can make any prop unbreakable in Gmod just by making it a magnet (with power 0 if you don't want it to stick to stuff) but it has the side effect of making the prop no longer belong to you and by acting as though you never spawned it which makes undoing the magnetism or the object itself impossible (you have to use the remover tool).
[QUOTE=Larikang]Actually my question is does this mod work well with the various prop-protector mods and the undo menu?
Because you can make any prop unbreakable in Gmod just by making it a magnet (with power 0 if you don't want it to stick to stuff) but it has the side effect of making the prop no longer belong to you and by acting as though you never spawned it which makes undoing the magnetism or the object itself impossible (you have to use the remover tool).[/QUOTE]
I only tested my tool with my prop protection, like I said in the first post, they work well together, And there is no reason it doesn't work with other prop protector, because it's just a stool, nothing else.
[IMG]http://www.thepunishermerchandise.com/movie/unbreakable/21580lf.jpg[/IMG]
What I thought of when I saw the thread title.
Good idea, i'll have to try this STOOL out.
Very, again, very useful.
Useful for builders!
The version 1.1 is out !
I have changed the protection system, using the Spoco's idea. I don't use the JetBoom idea because
1) It doesn't work :D
2) A prop with 99999 life is breakable, especially in gmod !!
And I Add a check box (checked by default) wich allow you to extend your click on all constrained objects (even pulley..). Just have a look on the screenshot.
I prefer this solution instead of put a button 'make all props unbreakable' which will totally screw up all addons which protect props..
Enjoy!
Sorry, you need to Log In to post a reply to this thread.