Problem with Lecture Spawning the Projectile

Hi, as Roydiggs mentioned, the lecture “Spawning the Projectile” is identical to the lecture “The Projectile Class”. I believe the code for spawning the projectile was skipped over. When I tried to copy the code from the project files, I got the following error message:

Any help would be appreciated.

Hi!

Same problem with the duplicated lecture but I got the code to compile. Did you also include the changes in BasePawn.h?

UPROPERTY(EditDefaultsOnly, Category = Combat)
TSubclassOf<class AProjectile> ProjectileClass;

Good luck!

1 Like

Also I believe you have to set the ProjectileClass in the editor in BP_PawnTurret and BP_PawnTank here:

It seems to work for me when I hit play but I hope I’m not doing something wrong :smiley:

1 Like

Thank you so much!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms