Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: Bleidd64 on March 30, 2019, 09:38:50 AM

Title: Spaw NPC with playermodel?
Post by: Bleidd64 on March 30, 2019, 09:38:50 AM
I have a playermodel Miku and I want to spawn a npc_citizen with that skin using "ulx ent". Is it possible to do? Note: that's what the Q menu in sandbox does - spawns a Citizen with model of Miku when I press on Miku.
Title: Re: Spaw NPC with playermodel?
Post by: Timmy on April 09, 2019, 01:10:13 PM
This is what such a command would look like:

ulx ent npc_citizen citizentype:4 | model:models/yourmodel.mdl



How to find the path to a model?
Start a new sandbox game, open the spawn menu, right-click the model and select "Copy to clipboard".

(https://timmy.github.io/images/gmod-model-to-clipboard.png)

What do the flag and value pairs mean?
<flag>:<value>Meaning
citizentype:4This sets the citizen's appearance to "unique", making it use a custom model. (source (https://developer.valvesoftware.com/wiki/Npc_citizen#Keyvalues), citizentype values (https://wiki.garrysmod.com/page/Enums/CT))
model:models/yourmodel.mdlPath to the custom model.



See Topic: Pro tips (https://forums.ulyssesmod.net/index.php/topic,3075.0.html) for more "ulx ent" examples.
Title: Re: Spaw NPC with playermodel?
Post by: Bleidd64 on April 19, 2019, 02:57:41 AM
Thank you! The part I was missing was citizentype:4. I tried to do it like type:unique and type:4.