Alright. I think I've got exactly what I'm looking for now. Here's what I did:
Code: AGS
calling:
cFeynman.SayY(220,"Okay...");
Works pretty perfectly. Didn't change it drastically from Khris' recommendation, but I should be able to use it whenever my characters heads don't match up with their sprite heights.
Thanks! I appreciate it.
Edit: And I did typo the header file. It says "import void SayY(this Character*, int textHeight, String text);" now... In case anyone needs to know in the future.
void SayY(this Character*, int textHeight, String text){ //Text height declared for use on other characters
int x = this.x - 200-GetViewportX(); //subtracting 200 as well because "SayAt" width messes with the
//coordinates
int y = this.y - GetViewportY();
textHeight = y - textHeight;
this.SayAt(x, textHeight, 400, text);
}
calling:
cFeynman.SayY(220,"Okay...");
Works pretty perfectly. Didn't change it drastically from Khris' recommendation, but I should be able to use it whenever my characters heads don't match up with their sprite heights.
Thanks! I appreciate it.
Edit: And I did typo the header file. It says "import void SayY(this Character*, int textHeight, String text);" now... In case anyone needs to know in the future.