A State

From ZDoom Wiki
Jump to navigation Jump to search

return A_State(int offset);
return A_State(str state);


For use in If-Else blocks and Multi-Execution Blocks only. Allows ending of a block of code prematurely to jump directly to an offset or a state. The return keyword is required before its declaration, and so is the semicolon after the closing parenthesis.

Only one type of code block function can be used within a series of blocks at any given time.

NOTE: Actors NOT derived from CustomInventory should use this function instead of A_Int and A_Bool, as the aforementioned do nothing on regular actors.


  • state/offset - Sets the state/offset to jump to. Set this to 0 or "" to abort the code block without performing a jump, and the rest of the actor tic will play out.


Nuvolachalk.png Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated.

See Also