[SOLVED AGAIN] Another simple question about TEXTURE

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
Endie
Posts: 227
Joined: Thu Mar 16, 2017 7:34 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Somewhere in the void

[SOLVED AGAIN] Another simple question about TEXTURE

Post by Endie »

So, i was trying to adjust the scope graphic to my sniper rifle, and used the TEXTURE lump to adjust offsets and stuff.

Here is the part where my question is:

Code: Select all

Sprite M98BA0, 480, 260
{
	Offset -160, -20
}
Right, and now there's the sprite itself
M98BA0.png
my problem is, my graphic just don't show up when i aim with the weapon, i don't know why, it's just like the graphic don't exist in the game.
and no, the problem isn't in the weapon code, i've checked just before posting here
You do not have the required permissions to view the files attached to this post.
Last edited by Endie on Sat Mar 03, 2018 3:18 pm, edited 1 time in total.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed

Re: Another simple question about TEXTURE

Post by wildweasel »

Your TEXTURES entry doesn't specify a patch. The way I'd do this is put your actual scope graphic in the /graphics folder, then add it as a patch in the TEXTURES entry thusly:

Code: Select all

Sprite M98BA0, 480, 260
{
   Patch SCOPEGFX, 0, 0
   Offset -160, -20
}
User avatar
Endie
Posts: 227
Joined: Thu Mar 16, 2017 7:34 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Somewhere in the void

Re: Another simple question about TEXTURE

Post by Endie »

Oh, i see. Thanks Wildweasel
Kotti
Posts: 86
Joined: Tue Dec 27, 2016 4:08 am

Re: Another simple question about TEXTURE

Post by Kotti »

wildweasel wrote:...in the /graphics folder...

Shouldn'Ät it go into the "/patches" folder? That one sounds like it's the correct one for patches other textures are built of.
User avatar
Endie
Posts: 227
Joined: Thu Mar 16, 2017 7:34 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Somewhere in the void

Re: Another simple question about TEXTURE

Post by Endie »

idk why this post is here, maybe a glitch or whatever, ignore this
Last edited by Endie on Mon Mar 05, 2018 2:39 pm, edited 1 time in total.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49211
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [SOLVED AGAIN] Another simple question about TEXTURE

Post by Graf Zahl »

To answer the question, yes, it should go into 'patches'.
The various subdirectories have special meaning when texture priority is important. And yes, some people have experienced problems when they did not do it right. A patch in 'patches' is guaranteed to have lower priority than the other texture types so it won't get in the way, e.g. when a patch has the same name as the texture that uses it. In the other directories all bets are off and you can end up with the wrong texture being picked, based on context.

Return to “Scripting”