Garry's Mod

Garry's Mod

143 ratings
Using the Infinity Gauntlet's Universal Law
By Xyz_
How to use the Universal Law ability found in my Infinity Gauntlet SWEP. People said they wanted a guide.
   
Award
Favorite
Favorited
Unfavorite
Creating a Law
Click the "New Law" Button and then type a name into the resulting prompt and hit "Ok"
Selecting Law Event
The event is what "law" you are modifying. Basically, the event actually triggers whatever actions you will later create. For example, choosing the "Bullets Fired" event could allow you to cause black holes to be created wherever bullets land.
As seen in the image, simply click the "Select Event" dropdown and choose an event. Make sure to click the "Save & Apply" button to keep your work. I'll be selecting "Entity Damaged" for this guide.
Creating Simple Actions
Firstly, an action is, as the name implies, an action that will be taken when the event is triggered. For example, one action is "Ignite," which will catch the target entity on fire for a variable amount of time.

I will now describe the contents of this image:

1. This is the event's "special" option. Clicking the checkmark will choose if we want the damage to always be negated. Everything past the checkbox is a conditional field, which I will explain later.

2. This is the action selection. The first dropdown lets you select the the target to apply the action to. I have "Entity" selected, meaning ANY entity (which basically means any object in the world, like the player, or an NPC, or a prop.) will be targetted by my action. If I were to select "Player" in this field, then my action would only target players.
The second dropdown is the actual action to apply, the options for this field depend on the selected target, but I'll be using Ignite. After selecting an action, be sure to click "Add Action" to actually add your action to the event.

3. These are the settings for my Ignite action. They vary depending on whatever action you are editing, but their settings should be pretty self explanatory. Here I have it so my target entity is ignited for 50 seconds.

And we're done creating a basic action! Remember to click "Save & Apply" to put your law into effect. The law I have created here will cause anything hurting another entity to get lit on fire for 50 seconds.
Conditionals
Conditionals allow you to decide IF an action should be executed. I'll continue working off my law from the previous section.

In this image, I have set up a conditional for the event's setting to Negate Damage. With this conditional, damage will only be negated if "Entity" (The entity taking damage in this event) is a "Player" and if that player is on the ground. "Invert Conditional" would flip the "Is On Ground" check around, which would cause players to take no damage when off the ground.

Now, moving on to our Ignite action.


As you can see, I have added a "Health Comparison" event. Likewise to the last conditional I made above, I am testing "Entity," the entity taking damage in the event. This conditional simply compares the entity's health to a value and requires us to enter in some settings for it. The addition of this conditional makes it so that any Entity damaging something will get caught on fire for 50 seconds if their health is "Less Than Or Equal To" 20. Clicking "Invert Conditional" here will simply make it so the attacker will get caught on fire if their health is NOT "Less Than Or Equal To" 20, so if they are above 20 health.
Conclusion
The Universal Law ability is very powerful and can do some fun things if you understand how to use it. If you have any trouble understanding how to use it, keep messing with it and it'll eventually click for you. Here are some ideas for laws you could create:

NPCs get horrible accuracy
Upon a player hitting the ground, create an egg over them to fall on their head.
All entities that are going too fast get caught on fire
Entities that hit something while moving too fast turn into a black hole.
Players punting props with the gravity gun are forced to say something.
Props spawned by players constantly scream.
Removed entities create a shower of gore.
Player footsteps cause tiny explosions.
Players are made immune to bullet damage.
65 Comments
Venoxy 3 Nov, 2022 @ 5:01pm 
This is kind of like the /execute command in minecraft. That's why it's so amazing.
ShadowLuca 21 Jul, 2021 @ 6:26am 
it kinda clicked for me but maybe you could manage to show more of what it can do so its easier for new players also whenever i click "nothing" in the menu it just resets the things i put in
nihgt trap gamer 13 Dec, 2020 @ 10:15am 
how to make worm hole
Mutanted (Nittza's BIG Hater) 22 Sep, 2020 @ 11:29am 
so u can control reality basically?
domyn 25 Jul, 2020 @ 8:27am 
I need a way to transfer laws over to different games, is that possible?
KorbenTheShep 22 Feb, 2020 @ 8:26am 
E
Northern Puffer 15 Aug, 2019 @ 12:20am 
@FanBanned you should press a button like "save" or something. Otherwise it just deletes itself.
Xeoplitz 14 Jun, 2019 @ 1:03pm 
how would one go about making it so that as soon as a player spawns a weapon it deletes the weapon
Lan 31 May, 2019 @ 11:13pm 
what if two people snap the Infinity Gauntlet at the same time?
regicider 10 May, 2019 @ 11:26pm 
this just straight up deletes the laws I made as soon as I leave the menu'