GetClassName

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;
	}
}

This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.