InDemoMode: Difference between revisions

From Zandronum Wiki
(3.1 is released, so Devfeature templates have been removed)
No edit summary
Tag: Source edit
Line 2: Line 2:
int '''InDemoMode''' (void)
int '''InDemoMode''' (void)


==Usage==
== Usage ==
 
=== Return value ===
This function can be used to determine if a demo is currently being run or not.
Returns true if the engine is currently playing a demo, false otherwise..
 
==Examples==


== Examples ==
<syntaxhighlight lang="c" line="1">
<syntaxhighlight lang="c" line="1">
Script 1 OPEN
Script 1 OPEN
Line 16: Line 15:
     }
     }
}
}
</syntaxhighlight >
</syntaxhighlight>


[[category:ACS Functions]]
[[category:ACS functions]]

Revision as of 18:41, 2 July 2022

This article documents a Zandronum-specific ACS feature which may not be supported by ZDoom and its other child ports.

int InDemoMode (void)

Usage

Return value

Returns true if the engine is currently playing a demo, false otherwise..

Examples

Script 1 OPEN
{
    if (InDemoMode())
    {
        PrintBold(s:"We are watching a demo right now!");
    }
}