Add Experience Points
UE5 Experience System Version: 1.0Add player experience
To add player experience to a single experience type simply call the AddExperience event. This event has a Name input called ExperienceType. This should be a reference to the row name for the experience type in your data table. The float value amount is the amount of experience to add to the player. This value should be the base amount. Multipliers will be applied to this base amount to come up with the final amount that is applied to the player.
Bulk add different experiences with different amounts
Use the AddExperienceBulk to add multiple experiences at one time. The input on this function is a map, the keys in this map should be your experience types, and the values are the base amount of experience to add. The system will iterate through and call the AddExperience event for each one. Most of the examples in the demo world reward multiple experience types, and this is the event that is used to handle that. Review the example player controller BP_ExperienceExamplePlayerController found at the base of the Demo/ folder to see how I am using this event to award endurance and jumping experience at the same time whenever the player jumps.
Share experience in Multiplayer Games
For multiplayer games you can also use the AddExperienceShared event, which functions similar to the AddExperienceBulk method but has the added feature that lets you distribute additional experience to all other connected players. In addition to the Experience map input you also have a float called AwardOthersMultiplier. If you leave this to 1 the other players will receive the same amount as the player who instigated it (typically the player who got the last hit/kill). If you set this to a value between 0 and 1 the other players will receive only a fraction of the experience as the instigator (this value multiplied by the base experience awarded to the instigator). If you set this value above 1 the other players will receive more than the player who instigated the event.