Arixsus
(Arixsus)
January 30, 2017, 9:17am
125
I believe this would be covered by my Character Status system. You would use the following two BP nodes:
GetCharacterStatuses() - Gets an array of statuses affecting this character
AddOrUpdateCharacterStatus(FString StatusName, int32 StatusValue, int32 StatusDurationMinutes) - Add or update a status on this character.
So to add IsBleeding for 5 minutes with a bleed of 2 HP per whatever periodic cycle you choose in your game you might call the following:
AddOrUpdateCharacterStatus(“Bleed”, 2, 5)
Then when you call GetCharacterStatuses() the array would contain a row with “Bleed”, 2, 5 where the 5 would automatically be reduced to the number of minutes remaining on the effect and the effect would be automatically removed from persistent storage after 5 minutes.
You would only put long running statuses into persistent storage. There is no need to persist a 10 second status as it would be gone by the time you logged out and back in. You will have to choose where the point between short term and long term effects is for your game, but I would suggest somewhere around 1 or 2 minutes.
Sounds good to me! Are you going to provide documentation on how to add to or create new nodes for persistent data storage? Sounds easy enough but I think reference material is always a plus.