Hi I am following a guide on how to apply a texture icon when an NPC speaks it says here:
-
Add a UPROPERTY function (type UTexture2D*) for the NPC’s face texture. Draw the NPC’s face beside its message in the output.
//you can select face icons to be attached to the NPC’s face in blueprints. // Attach a texture to your struct Message: //UTexture2D* tex; //To render these icons, you need to add a call to DrawTexture() with the right texture //passed in to it:
// DrawTexture( messages[c].tex, x, y, messageH, messageH, 0, 0, 1, 1 );
struct Message { FString message; float time; FColor color; UTexture2D* tex; Message() { time = 5.f; color = FColor::White; } Message(FString iMessage, float iTime, FColor iColor) { message = iMessage; time = iTime; color = iColor; } DrawTexture(message[c].tex, x, y, messageH, messageH, 0, 0, 1, 1); };
I’m using 4.7.6. Did they update the callback? Or did i do something wrong?