Portobelly Production Journal #3

15/01/2019

Yesterday I managed to adapt the suction ability so that it works correctly with skeletal meshes. This needed to be adapted because the system only supported static meshes which would not be functional for attack enemies with the suction ability (characters use skeletal meshes as they contain bones and animations). Today I have been working on adapting the digesting ability so that it works with skeletal meshes.

Fig 1 - Belly absorbing a skeletal mesh character (the white object is the skeletal mesh)

The clip above shows my progress on the suction, digestion and eject ability. The value counting down from 100 is the health of the skeletal mesh blueprint. In the section below I will explain how I reached this point and my method of reaching this point.

Fig 2 - Previous method for creating an array for the objects that overlap the digestion radius

Fig 3 - Changing the static mesh pickup object to use a Pawn as parent rather than an Actor class

Fig 4 - New method for creating an array of overlapping actors for the digestion queue

The previous system for creating an array only involved using one type of object class which was the PickupObject Actor so when I was using the GetOverlappingActors node I was able to filter the array using PickupObject Actor. Using this filter would populate the array with actor of only this class. This method was effective for finding one class, however, it was unable to find other classes when I wanted to search for the PickupCharacter blueprint as well as the PickupObject blueprint. To solve this issue I changed the parent class of the PickupObject blueprint to a Pawn instead of an Actor class. Making this change allowed me to change the the class filter of the GetOverlappingActors node to the Pawn class as both the Pawn and Character blueprints inherit from Pawn class. This would create a successful cast to both the PickupObject class and the PickupCharacter class. I had to add a remove item from array node so that the player was not included in the array because Belly’s class is also a child of the Pawn class.

Fig 5 - Updated digestion queue blueprint that casts to the PickupObject (Static mesh) and the PickupCharacter (Skeletal mesh).

Fig 6 - Close up of the print string that activates when the both casts fail

Most of the function from the old digestion queue blueprint could be duplicated and adapted so that the digestion ability could be used on skeletal meshes. I added a second IsValid check on to the cast to the static mesh blueprint. This had to be implemented to prevent the player from absorbing two object at once (One static mesh and one skeletal mesh). I added a print string which will be called if an Pawn that is not a child of the PickupObject or PickupCharacter blueprints. This print string will also display the name of the blueprint that has caused the issue which will reduce my time spent trying to solve issue with this system in the future.

Fig 7 - Skeletal mesh ApplyDamage event

Fig 8 - Skeletal mesh AnyDamage event (Receive damage)

These damage events are exactly the same as the events that handle damage for the skeletal mesh blueprints.

Fig 9 - The blueprint that controls whether the player ejects the current absorbed object has been updated so that it works for skeletal meshes as well as static meshes.

The EjectCurrentObject function for the skeletal mesh works almost identically to the system for the static mesh blueprints. I added a second IsValid node to check if for both the types of meshes when the player pressed the absorb button. I had to include these checks to prevent the player from absorb multiple meshes at one time.

Tomorrow I plan to adjust the shrink and expand ability so that fine adjustments can be made using to triggers. This will allow the player to have more control over this ability.

 

Figures list

  1. Rees, O (2019). Belly absorbing a skeletal mesh character (the white object is the skeletal mesh). [Offline]. [Accessed 16/01/2019].

  2. Rees, O (2019). Previous method for creating an array for the objects that overlap the digestion radius. [Offline]. [Accessed 16/01/2019].

  3. Rees, O (2019). Changing the static mesh pickup object to use a Pawn as parent rather than an Actor class. [Offline]. [Accessed 16/01/2019].

  4. Rees, O (2019). New method for creating an array of overlapping actors for the digestion queue. [Offline]. [Accessed 16/01/2019].

  5. Rees, O (2019). Updated digestion queue blueprint that casts to the PickupObject (Static mesh) and the PickupCharacter (Skeletal mesh). [Offline]. [Accessed 16/01/2019].

  6. Rees, O (2019). Close up of the print string that activates when the both casts fail. [Offline]. [Accessed 16/01/2019].

  7. Rees, O (2019). Skeletal mesh ApplyDamage event. [Offline]. [Accessed 16/01/2019].

  8. Rees, O (2019). Skeletal mesh AnyDamage event (Receive damage). [Offline]. [Accessed 16/01/2019].

  9. Rees, O (2019). The blueprint that controls whether the player ejects the current absorbed object has been updated so that it works for skeletal meshes as well as static meshes. [Offline]. [Accessed 16/01/2019].