Message Monitor OnAbilityMessageCanStart Event

SteveC

Member
Hey guys!

I'd like to be able to present the name and maybe a 3D model of the item when the PickupItem Ability is activated.

F) Pickup
vs
(insert cool, spinning 3D model of it here)
F) Pickup FN SCAR 16s

... what's my best way of passing the ItemObject info to the MessageMonitor?

Thanks!
 
Last edited:
I would override the AbilityMessageText property so you can then provide more details on the pickup item type. The ability message monitor will then display the overridden property.
 
Thanks for the response, Justin!

Sorry to be the dumb one in this relationship, but would that look this in Ability.cs?
Code:
public override string MyAbilityMessageText { get { return m_AbilityMessageText; } set { m_AbilityMessageText = value; } }

... not sure how I might pass additional information from the PickupItem, you've already been so kind w/ the first question, any pointers?
 
Last edited:
For an example take a look at the Interact ability - the Interact ability has an override which changes the text based on the button mapping. You'll want to override AbilityMessageText and not create a new property.
 
For an example take a look at the Interact ability - the Interact ability has an override which changes the text based on the button mapping. You'll want to override AbilityMessageText and not create a new property.
Thanks Justin!

Here's my working test in PickupItem:
Code:
public override string AbilityMessageText
        {
            get
            {
                var message = m_AbilityMessageText;
                message = "Override that string!";
                return message;
            }
            set { base.AbilityMessageText = value; }
        }

temp.PNG

I'm still unsure of the best way to send the item info to be used here, but I'll dig into Interact more thoroughly later, maybe the answer's right there.

Thanks much!
 
Last edited:
Back
Top