- Create a new C++ class derived from the Actor class using the editor wizard; name it BaseEnemy:
- Add the following UPROPERTY to the class:
UPROPERTY()
FString WeaponName; UPROPERTY()
int32 MaximumHealth;
- Add the following class specifier to the UCLASS macro:
UCLASS(Blueprintable)class CHAPTER_09_API ABaseEnemy : public AActor
- Save and then compile the script.
- Open the editor and create a new blueprint class. Expand the All Classes list to show all of the classes and select our BaseEnemy class as the parent. Afterward, click on the Select button:
- Name the new Blueprint EnemyGoblin and open it in the Blueprint editor. ...