GetClassName

From ZDoom Wiki
Jump to navigation Jump to search

Name GetClassName ()

Usage

Returns the class name of the calling actor.

Return value

Returns the calling actors' class name as a name data type.

Examples

This replacement of the Revenant's missiles will print out the class name of the actor it is locked on to roughly every second.

Class AnnouncingRevenantTracer : RevenantTracer Replaces RevenantTracer
{
	States
	{
		Spawn:
			FATB ABABABABABABABAB 2 BRIGHT A_Tracer();
			FATB A 0
			{
				If (Tracer) //Make sure the projectile actually has a valid tracer pointer.
				{
					Console.PrintF ("I spy a %s with my little eye.",Tracer.GetClassName());
				}
			}
			Loop;
	}
}