ULX

Author Topic: Pro tips  (Read 43106 times)

0 Members and 1 Guest are viewing this topic.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Pro tips
« on: December 30, 2007, 10:54:32 AM »
This topic will be used to keep a running list of "pro tips", cool things you can do in ULX that you probably never realized

Tip #1
You can and should use the garrysmod root for configs! For example, the default ULX config is at garrysmod/addons/ulx/data/ulx/config.txt. Instead, you can put it simply at garrysmod/data/ulx/config.txt. You can also do this for map- or gamemod-specific configs. We also strongly recommend sticking your ulx_motd.txt in the garrysmod root.

The advantages of doing it this way are as follows. First and foremost, you don't have to go as deep in folders looking for the config. This also makes it so that the next version of ULX won't overwrite your files.



Tip #2 (power users only)
Very few people know about the "ulx ent" command, and fewer still know the power behind the command. You can spawn any entity with any parameters you can specify from Hammer. The format for this command is "ulx ent <entity> <flag>:<value> | <flag2>:<value2>...". The entity can be any of the supported entities. The flags and values are the same you would specify from Hammer, also listed here.

We'll start off with an easy example. Say the server I'm playing on restricts the rpg, but I need it for artistic reasons. Assuming I have access to the command, I simply open my console and enter:
Code: [Select]
ulx ent weapon_rpgThere is now an rpg where I was looking when I used the command.

Next, let's say I want to spawn an Alyx ragdoll. This time I would use:
Code: [Select]
ulx ent prop_ragdoll model:models/alyx.mdlThere's the Alyx ragdoll!

Now, let's say I want to spawn an Alyx ragdoll at the origin. A bit trickier this time, more than one flag and value pair needs to be separated with '|'
Code: [Select]
ulx ent prop_ragdoll model:models/alyx.mdl | origin:0 0 0Alyx ragdoll at the origin!

To create an ammo crate (play around with the ammotype number for a different ammo):
Code: [Select]
ulx ent item_ammo_crate ammotype:8 | solid:6
To create a chair you can sit in:
Code: [Select]
ulx ent prop_vehicle_prisoner_pod model:models/nova/jeep_seat.mdl | limitview:0
Create a combine that goes around releasing manhacks:
Code: [Select]
ulx ent npc_metropolice manhacks:10 | additionalequipment:weapon_stunstick
Now for the most advanced ent we'll cover here, a molotov bottle. You can specify outputs from the ulx ent command as well! The format for this is <outputname>:<targetname>,<inputname>,<parameter>,<delay>,<max times to fire, -1=infinite>. This following command makes a bottle that explodes and lights whatever it hits on fire.
Code: [Select]
ulx ent prop_physics physdamagescale:0.05 | model:models/props_junk/garbage_glassbottle001a.mdl | explodedamage:10 | exploderadius:100 | OnBreak:!activator,ignite,,0,-1 | health:9999
Other notes: You can set spawnflags using "spawnflags:value", IE "spawnflags:256" on a prop_physics makes the prop generate an output on use. This value is a bitmask.
« Last Edit: January 25, 2016, 02:09:21 PM by Megiddo »
Experiencing God's grace one day at a time.

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: Pro tips
« Reply #1 on: August 05, 2014, 02:01:13 AM »
Tip #2's links go to the same url. Sorry for the necro though, I just feel that this information might be accessed.
Out of the Garry's Mod business.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Pro tips
« Reply #2 on: October 26, 2014, 01:08:38 PM »
That's as it's supposed to be, Neku. No worries on the necro, I just referenced this post yesterday myself, ha ha.
Experiencing God's grace one day at a time.

Offline Zyklus

  • Full Member
  • ***
  • Posts: 109
  • Karma: 1
Re: Pro tips
« Reply #3 on: October 27, 2014, 02:08:19 PM »
Tip #over-nine-thousand:
Never ever ever mess with ?????.

Offline Aharon Tager

  • Newbie
  • *
  • Posts: 37
  • Karma: 0
    • Barely Legal Gaming
Re: Pro tips
« Reply #4 on: October 08, 2015, 06:11:44 PM »
Since this says its gonna be updated, the link provided no longer has the available flags (unless im mistaken). please can we get an update thanks.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Pro tips
« Reply #5 on: October 08, 2015, 09:26:46 PM »
The link is to a list of entities.
You click the entity you want info for and it takes you to the valve wiki for that entity.

Every entity has different flags. Posting them all on one page would be a cluster.

Offline Aharon Tager

  • Newbie
  • *
  • Posts: 37
  • Karma: 0
    • Barely Legal Gaming
Re: Pro tips
« Reply #6 on: October 09, 2015, 01:31:39 PM »
Thanks that was unclear before.