Class'Botpack.PickupMessagePlus'

Discussions about Coding and Scripting
User avatar
Barbie
Godlike
Posts: 3002
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Class'Botpack.PickupMessagePlus'

Post by Barbie »

AFAIS all TournamentPickup classes have PickupMessageClass=Class'Botpack.PickupMessagePlus'. Sadly this does not show Inventories' PickupMessage but its default PickupMessage. That means that manual setting of any TournamentPickup's PickupMessage is useless and will not be shown. Is there any workaround that the PickupMessage of that specific inventory is shown? (Except leaving PickupMessageClass empty what will show the "real" PickupMessage in chat area.)
code of Class'Botpack.PickupMessagePlus'

Code: Select all

//
// OptionalObject is an Inventory
//
class PickupMessagePlus expands LocalMessagePlus;


static function float GetOffset(int Switch, float YL, float ClipY )
{
	return ClipY - YL - (64.0/768)*ClipY;
}

static function string GetString(
	optional int Switch,
	optional PlayerReplicationInfo RelatedPRI_1, 
	optional PlayerReplicationInfo RelatedPRI_2,
	optional Object OptionalObject
	)
{
	if (OptionalObject != None)
		return Class<Inventory>(OptionalObject).Default.PickupMessage;
}

defaultproperties
{
     FontSize=1
     bIsSpecial=True
     bIsUnique=True
     bFadeMessage=True
     YPos=64.000000
     bCenter=True
}
"If Origin not in center it be not in center." --Buggie
User avatar
sektor2111
Godlike
Posts: 6460
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Class'Botpack.PickupMessagePlus'

Post by sektor2111 »

Sooner or later you all will do what I've already done...
All Inventories with BIG WHITE message on screen not just tiny letters on top...
Buggie
Godlike
Posts: 3249
Joined: Sat Mar 21, 2020 5:32 am

Re: Class'Botpack.PickupMessagePlus'

Post by Buggie »

Barbie wrote: Sat Dec 28, 2024 4:02 pm Is there any workaround that the PickupMessage of that specific inventory is shown? (Except leaving PickupMessageClass empty what will show the "real" PickupMessage in chat area.)
No. For this messages passed only class of inventory, not real object.
So unless you write own implementation of what send and receive, or use other mechanisms - that will not work.
I have same problem in XV. Weapon class same for all guns. That why make kill strings impossible different per each vehicle. Weapon class same and one for all vehicles.