I'm trying to familiarize myself with the Canvas functions. I figured the best way to do this is through a simple trigger function. However, I don't see how to get ahold of the Canvas object in the first place. I tried this code below:
Which gave me a run-time error, which I kind of expected. (The trigger's properties were set so that it would call its Trigger function when activated).
As I understand it there's no way to initialize a Canvas object like you might in Java. So is the only way to use a Canvas object is to have it called via some Event in UnrealScript? If so, what events can do this? All I've seen are Interactions.
Another issue: How come many of the code examples I see pass a parameter that says "Canvas Canvas" or "Canvas canvas"? Shouldn't that cause an error in the compilation?
Finally, in this link:
http://wiki.beyondunreal.com/wiki/Keypress_Interactions
How often is PostRender() called? I don't understand the relationship between Interactions and the Interaction master. How does an Interaction master route input to the appropriate Interactions? The wiki on this seems a little difficult to understand to me.
Code:
class CanvasTrigger extends Trigger; var Canvas c; function writeToScreen () { c.CurX = 100.00; c.CurY = 100.00; c.DrawText("We don't care what people say"); } function Trigger (Actor Other, pawn EventInstigator) { writeToScreen(); log("Look at me, I'm triggered!"); }
As I understand it there's no way to initialize a Canvas object like you might in Java. So is the only way to use a Canvas object is to have it called via some Event in UnrealScript? If so, what events can do this? All I've seen are Interactions.
Another issue: How come many of the code examples I see pass a parameter that says "Canvas Canvas" or "Canvas canvas"? Shouldn't that cause an error in the compilation?
Finally, in this link:
http://wiki.beyondunreal.com/wiki/Keypress_Interactions
How often is PostRender() called? I don't understand the relationship between Interactions and the Interaction master. How does an Interaction master route input to the appropriate Interactions? The wiki on this seems a little difficult to understand to me.
Comment