PrintPickupMessage: Difference between revisions

From ZDoom Wiki
Jump to navigation Jump to search
Content deleted Content added
GrayFace (talk | contribs)
Parameters: Proper description for localview
 
Line 10: Line 10:
=== Parameters ===
=== Parameters ===
*{{c|bool '''localview'''}}
*{{c|bool '''localview'''}}
:Whether the message belongs to the local player. Normally you should call [[CheckLocalView]] and pass the result here. Current implementation does nothing if this argument isn't ''true'', but this could change in the future.
:If true, the message will only be printed for the actor who picks up the item.


*{{c|String '''str'''}}
*{{c|String '''str'''}}

Latest revision as of 13:55, 29 August 2026

Inventory

native static void PrintPickupMessage (bool localview, String str)

Usage

An Inventory function called when an item is picked up in the world (normally is called automatically in the item's Touch virtual). Prints the item's PickupMessage on the screen of the player who picked it up. This function can be called manually to perform the print.

Note, this is not a virtual function; if you need to modify the actual message that gets printed, there's a separate virtual function that can be overridden for that: PickupMessage().

Parameters

  • bool localview
Whether the message belongs to the local player. Normally you should call CheckLocalView and pass the result here. Current implementation does nothing if this argument isn't true, but this could change in the future.
  • String str
A text string to be printed.

Examples

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