Boxing Game Update 4 (11/01/24)


To get a functioning prototype before adding animations, I next worked on adding an arm object during runtime that would destroyed after a few seconds. This way, the player would have to dodge to avoid a collision.

Enemy class

Path needs to be established in the initializer as that’s the only place “ConstructerHelpers” can be used. Also, both UStaticMeshComponent and UStaticMesh need to be used. The “CubeMesh” (UStaticMesh) is used to store the staticmesh, then the “LeftArmBox” (UStaticMeshComponent) sets the static mesh stored in “CubeMesh” later.

Originally I used “AddNewDefaultSubObject”, however this cannot be used during runtime. Therefore I opted for “NewObject”.

Punch Task

Adapted the Punch Task so that it casts to enemy to use the enemy functions. If the enemy is throwing an attack, a punching arm is created; and when they retreat, the punching arm is destroyed.


Leave a Reply

Your email address will not be published.