Hello. I just coded a new SENT and now want to create a spawn icon for it - exactly like the ones you see in the spawn menu > entities.
[IMG]http://i.imgur.com/zg7UyXw.png[/IMG]
I understand I need a VMT file, and a VTF file, but I don't know what exactly those two files should contain, I don't know where to put them, and I don't know how to link them to the SENT itself.
I downloaded VTFEdit, I have the 128x128 picture, I just don't know what to do next. I couldn't find the information I needed elsewhere.
Would really appreciate some guidance.
Thanks.
So I'm fairly sure this is what the path should look like:
materials/vgui/entities/class_name
For example, for an entity with the class name my_example, it would look like...
materials/vgui/entities/my_example.vtf
materials/vgui/entities/my_example.vmt
In the [b]materials/entities/[/b] folder, place a .vtf and .vmt with the same exact name as your entities class.
For example you made a swep called weapon_420yolo, you would make a material called weapon_420yolo.vmt and its corresponding texture weapon_420yolo.vtf
Awesome, trying it now.
If I want the spawn icons to be visible to newly joined players in my server (running its own gamemode), would they need to be in garrysmod\gamemodes\GAMEMODENAME\content\materials\vgui\entities ?
[B]Edit:[/B]
Sigh, I'm missing something.
My SENT's [B]PRINT NAME is[/B] "Spawn Beacon", its lua file name is wrbx_spawn_beacon.lua, and currently in Entities>CategoryName, it looks like this:
[IMG]http://i.imgur.com/ejXryal.png[/IMG]
Then I have these two:
wrbx_spawn_beacon.vmt
wrbx_spawn_beacon.vtf
^They are located in garrysmod\gamemodes\GAMEMODENAME\content\materials\vgui\entities.
The VMT file's code is:
[CODE]
"wrbx_spawn_beacon"
{
"$basetexture" "wrbx_spawn_beacon"
}
[/CODE]
Nothing's showing up. I feel stupid. :(
Change the contents of the .vmt file to this.
[code]
"UnLitGeneric"
{
"$basetexture" "vgui/entities/wrbx_spawn_beacon"
}
[/code]
Thanks for reading my post. Try putting them in [b]materials/entities/[/b] instead.
[QUOTE=Walrus Viking;47095223]Thanks for reading my post. Try putting them in [b]materials/entities/[/b] instead.[/QUOTE]
I think they go into the materials/vgui/entities folder, I was looking at an addon of mine for reference.
There was definitely an issue with his .vmt file, both the name of the shader and the path were incorrect.
[QUOTE=Walrus Viking;47095223]Thanks for reading my post. Try putting them in [B]materials/entities/[/B] instead.[/QUOTE]
I tried putting them there. It didn't work (because apparently my VMT file was messed (as well as my VTF?)) Sorry if it seemed like I didn't, I was unclear.
I just recreated the files and they are now in my client's garrysmod\materials\vgui\entities (fairly sure the vgui folder doesn't matter btw) and [U]it works[/U]. Thanks.
The location is fine, and it depends on how you want them to download it.
For example, you can add them to your server's FastDL.
[QUOTE=Jeezy;47095247]The location is fine, and it depends on how you want them to download it.
For example, you can add them to your server's FastDL.[/QUOTE]
how2pl0x?
:v
You can also use a .png image, which I recommend you to do. [B]materials/entities/<class_name>.png[/B]
To force client to download your icon, use resource.AddFile("materias/entities/myicon.png") function ON SERVER
[QUOTE=Robotboy655;47096196]You can also use a .png image, which I recommend you to do. [B]materials/entities/<class_name>.png[/B]
To force client to download your icon, use resource.AddFile("materias/entities/myicon.png") function ON SERVER[/QUOTE]
Oh. Wicked. I'm totally doing that then. Might even play a little with transparency if it allows me. Thanks<3
Sorry, you need to Log In to post a reply to this thread.