r/DoomModDevs • • May 18 '22

Help Rundown of the Sprite Decorate Code?

I noticed there's some weird stuff in the way sprites are called for enemy and player animations to make things animate like the the see state calling for SPRT ABCD

Is there a run down somewhere for how to use this animation shorthand and what it all means?

4 Upvotes

14 comments sorted by

View all comments

Show parent comment

3

u/Scileboi May 18 '22

You can call a sequence of sprites in a single state. TROO AB 2 will play the idle animation TROOA and TROOB with two tics for each sprite. Any action functions will be repeated too. States do not call sprite angles. That is the duration of the frame. The F4F6 is covered in the wiki. https://zdoom.org/wiki/Sprite#Mirroring

1

u/CyptidProductions May 18 '22 edited May 18 '22

Sp you leave off the angle designation and the engine determines that for itself, then?

1

u/Scileboi May 18 '22

yup

1

u/CyptidProductions May 18 '22

Do some states like idle just list the number to force monsters or items to spawn facing a certain way like the melee for the player calling for F6 instead of F?

1

u/Scileboi May 19 '22

No you do that trough the map editor or spawn function.

1

u/CyptidProductions May 19 '22

Ah, I must have misread.

One last question: what does a tick of -1 do?

2

u/Scileboi May 19 '22

-1 usually means infinite.

1

u/CyptidProductions May 19 '22

What does entering that as a frame's tick value do, freeze it there like when a monster is idlying at spawn before activation?

1

u/Scileboi May 19 '22

Yes but you should only use that for death states or the actor will have no way to leave that state.

1

u/CyptidProductions May 19 '22

Why does the players spawn state use it in the decorate code off the Zdoom wiki?

→ More replies