OK, so ignore the last post, I did some experimenting and here is where I am.
I want some test to come up when the players touches the trigger, here is what I have go so far.
I think the problem is in this line in the trigger touch function
"PlayerController(Pawn(Other).Controller).myHUD.Ad dPostRenderedActor(self);"
I don't think the PostRenderFor is being sent to the HUD, maybe I need to fix change this line? I got it from the Mougli's tutorials.
Trigger Touch Code
Code:
event Touch (Actor Other, PrimitiveComponent OtherComp, vector HitLocation, vector HitNormal)
{
super.Touch(Other, OtherComp, HitLocation, HitNormal);
if (Pawn(Other) != None)
{
PlayerController(Pawn(Other).Controller).myHUD.AddPostRenderedActor(self);
IsInInteractionRange = true;
}
}
Trigger PostRenderFor Function
Code:
simulated event PostRenderFor(PlayerController PC, Canvas Canvas, vector CameraPosition, vector CameraDir)
{
super.PostRenderFor(PC, Canvas, CameraPosition, CameraDir);
Canvas.SetPos(100, 100); //top left corner
Canvas.SetDrawColor(255, 255, 255, ); //white
Canvas.DrawText("AT LAST!!", , 1.0f, 1.0f); //the 2.0f is X and Y scale
}
I have made a basic HUD class aswell, which works fine
Code:
class BaseHUD extends UDKHUD
config(BaseHUD);
simulated event PostRender()
{
super.PostRender();
Canvas.SetPos(10, 10); //top left corner
Canvas.SetDrawColor(255, 255, 255, ); //white
Canvas.DrawText("Hurray, it WORKS!", , 1.0f, 1.0f); //the 2.0f is X and Y scale
}
defaultproperties
{
}
If anyone could help me out I would appreciate it, it is driving me crazy.
Thanks
Bookmarks