Trying to make a animated menu graphic, it wont scale

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
JetteboyTV
Posts: 52
Joined: Mon Sep 04, 2023 9:17 am

Trying to make a animated menu graphic, it wont scale

Post by JetteboyTV »

Screenshot 2023-12-10 200513-min(1) (convert.io)(1).jpg
I been trying to make a custom M_SKULL1 menu graphic, and ive been trying to scale the graphic down, but it wont scale down...
45.gif
Animdefs code:

Code: Select all

texture optional M_SKULL1
	pic "BULLET01" tics 2
	pic "BULLET02" tics 2
	pic "BULLET03" tics 2
	pic "BULLET04" tics 2
	pic "BULLET05" tics 2
	pic "BULLET06" tics 2
	pic "BULLET07" tics 2
	pic "BULLET08" tics 2
	pic "BULLET09" tics 2
	pic "BULLET10" tics 2
	pic "BULLET11" tics 2
	pic "BULLET12" tics 2
	pic "BULLET13" tics 2
	pic "BULLET14" tics 2
	pic "BULLET15" tics 2
	pic "BULLET16" tics 2
	pic "BULLET17" tics 2
	pic "BULLET18" tics 2
	pic "BULLET19" tics 2
	pic "BULLET20" tics 2
	pic "BULLET21" tics 2
	pic "BULLET22" tics 2
	pic "BULLET23" tics 2
	pic "BULLET24" tics 2
Textures code:

Code: Select all

Graphic "M_SKULL1", 75, 75
{
	XScale .5
	YScale .5
	Patch "BULLET01", 0, 0
	Patch "BULLET02", 0, 0
	Patch "BULLET03", 0, 0
	Patch "BULLET04", 0, 0
	Patch "BULLET05", 0, 0
	Patch "BULLET06", 0, 0
	Patch "BULLET07", 0, 0
	Patch "BULLET08", 0, 0
	Patch "BULLET09", 0, 0
	Patch "BULLET10", 0, 0
	Patch "BULLET11", 0, 0
	Patch "BULLET12", 0, 0
	Patch "BULLET13", 0, 0
	Patch "BULLET14", 0, 0
	Patch "BULLET15", 0, 0
	Patch "BULLET16", 0, 0
	Patch "BULLET17", 0, 0
	Patch "BULLET18", 0, 0
	Patch "BULLET19", 0, 0
	Patch "BULLET20", 0, 0
	Patch "BULLET21", 0, 0
	Patch "BULLET22", 0, 0
	Patch "BULLET23", 0, 0
	Patch "BULLET24", 0, 0
}
You do not have the required permissions to view the files attached to this post.
User avatar
Sir Robin
Posts: 537
Joined: Wed Dec 22, 2021 7:02 pm
Graphics Processor: Intel (Modern GZDoom)
Location: Medellin, Colombia

Re: Trying to make a animated menu graphic, it wont scale

Post by Sir Robin »

The scale in TEXTURES lump is reversed, so to scale something down you give it a bigger number. To scale something to 50% you set the scale to be 2.0 instead of 0.5
User avatar
JetteboyTV
Posts: 52
Joined: Mon Sep 04, 2023 9:17 am

Re: Trying to make a animated menu graphic, it wont scale

Post by JetteboyTV »

Sir Robin wrote: Tue Dec 12, 2023 12:18 pm The scale in TEXTURES lump is reversed, so to scale something down you give it a bigger number. To scale something to 50% you set the scale to be 2.0 instead of 0.5
ok, just did this but it still wont scale
Screenshot 2023-12-12 211203.png
Screenshot 2023-12-12 211229 (convert.io).jpg
You do not have the required permissions to view the files attached to this post.
User avatar
Sir Robin
Posts: 537
Joined: Wed Dec 22, 2021 7:02 pm
Graphics Processor: Intel (Modern GZDoom)
Location: Medellin, Colombia

Re: Trying to make a animated menu graphic, it wont scale

Post by Sir Robin »

Each bullet needs to be in it's own graphic declaration in TEXTURES. You're loading all the graphics into the M_SKULL1 graphic as patches which isn't accomplishing much, and then never showing it. Temporarily take out (or comment out) the ANIMDEFS lump and you will see that the scale is working.
User avatar
Sir Robin
Posts: 537
Joined: Wed Dec 22, 2021 7:02 pm
Graphics Processor: Intel (Modern GZDoom)
Location: Medellin, Colombia

Re: Trying to make a animated menu graphic, it wont scale

Post by Sir Robin »

example:

Code: Select all

graphic "M_BULL01", 75, 75
{
  xscale 2
  yscale 2
  patch "BULLET01", 0, 0
}
do this for all 24 frames, then use M_BULLxx in ANIMDEFS instead of BULLETxx
User avatar
JetteboyTV
Posts: 52
Joined: Mon Sep 04, 2023 9:17 am

Re: Trying to make a animated menu graphic, it wont scale

Post by JetteboyTV »

Sir Robin wrote: Wed Dec 13, 2023 6:07 am example:

Code: Select all

graphic "M_BULL01", 75, 75
{
  xscale 2
  yscale 2
  patch "BULLET01", 0, 0
}
do this for all 24 frames, then use M_BULLxx in ANIMDEFS instead of BULLETxx
thanks! it scales down now
Screenshot 2023-12-13 134503 (convert.io).jpg
You do not have the required permissions to view the files attached to this post.

Return to “Scripting”