I can't thing of a good title for this so ya.
So this question is about clothing and where they take there sprite from. I a long while back I learned how to add clothing and add sprites for said clothing but now I have ran into a issue. I wanted to make a file for all my sprites or at least the ones I want to use but it seems that the clothes take there sprite through "icon_state = name" and that only pulls from one file now my question is is it possible to change said file while leaving the other intact? Any help is very appreciated. If its not possible then well then this will be harder then I thought it would be.
Thanks for reading and any help given.
icon_state question
-
- Joined: Thu Jan 12, 2017 6:38 am
- Byond Username: Central Core
- Location: Earth
- Jordie0608
- Site Admin
- Joined: Tue Apr 15, 2014 1:33 pm
- Byond Username: Jordie0608
- Github Username: Jordie0608
- Location: Spiderland, Australia
Re: icon_state question
The 'icon' variable designates which .dmi file is used, pathed as from the root of the codebase i.e.
Code: Select all
icon = 'icons/obj/clothing/myfile.dmi'
Forum Admin
Send me a PM if you have any issues, concerns or praise of fishfood to express about the forums.
Send me a PM if you have any issues, concerns or praise of fishfood to express about the forums.
- Thunder11
- In-Game Admin
- Joined: Fri Apr 18, 2014 12:55 pm
- Byond Username: Thunder12345
- Github Username: Thunder12345
- Location: Scotland, UK
Re: icon_state question
For clothes specifically, what you want to do is varedit the icon var to the DMI file with the new inventory sprite, and also the alternate_worn_icon var to the DMI with the new on-mob sprite.
EDIT: Oh you're talking about in the code. In that case just set both the vars above to the files you want when defining the item
EDIT: Oh you're talking about in the code. In that case just set both the vars above to the files you want when defining the item
Spoiler:
Who is online
Users browsing this forum: No registered users