Recieving Null Pointer in-between methods
I have a damage interface that takes in a pointer to an actor, damage and a float for force: UFUNCTION(BlueprintNativeEvent) void RecieveDamage(AActor* otherActor, float damage, float force);
When called from any class to my player class, the function works and I receive no issues. However, when all of the same classes call on my enemy class the enemy class otherActor is received as a nullptr and crashes the game. I am not calling them any differently and I cannot figure out why the enemy class is only receiving null pointers from the method call.
Here is the Player Function:
And Here is the enemy function:
asked Mar 03 '19 at 10:45 PM in C++ Programming
I found out what it was,
turns out I was calling the recievedamage function in a blueprint sub-class and it was overriding the function without passing the otherActor parameter.
answered Mar 09 '19 at 10:25 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here