What does TNT1 AAA 0 do?

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!)
echo4
Posts: 11
Joined: Fri Nov 09, 2018 2:35 am

What does TNT1 AAA 0 do?

Post by echo4 »

Hello,

I am wondering what this line does and why this would be used at all? From what I understand, it displays a blank sprite for 0 tics, still, why do this at all? I can understand if there is a function call afterwards (like A_ReFire), but not if there is nothing at all.

TNT1 AAAAAAAAAAAAAAAAA 0

Also, what is the difference between the line above and say

TNT1 AAA 0

From what I understand, the # of letters means it would loop through 3 states with 0 tics

TNT1 AAAAA 0

and the above would be 5 states with 0 tics.

Still, why would more states be useful? Is it to make goto+offset more likely to hit it? A mystery...

Thanks
User avatar
Rachael
Posts: 13923
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: What does TNT1 AAA 0 do?

Post by Rachael »

To answer that question it's best to get into the minds of those who are in the development process. What's most likely the case here is these are leftover remnants of when these actually had function calls.

The states may be left in because the author does not want to recalculate their goto+offsets, or because they plan to add something back again later and wanted to preserve the number of state frames the original implementation had.

But beyond that - it's anyone's guess why any particular developer does it.
echo4
Posts: 11
Joined: Fri Nov 09, 2018 2:35 am

Re: What does TNT1 AAA 0 do?

Post by echo4 »

Thanks for the reply. Another reason why its often easier to write code than read it.

You indirectly answered another one of my questions about offsets. I tend to replace offset gotos/jumps with labels because it was tricky to know if goto+2 meant 2 states ahead, 2 lines of code ahead, 2 tics ahead, etc. Now you confirm it is 2 states ahead.

Return to “Scripting”