[Resolved] Passing a variable into User Defined Displayable
Posted: Tue Feb 11, 2014 10:26 pm
I'd like to be able to pass a variable into a User Defined Displayable (or call an external variable from a UDD class) such that I can change a UDD on the fly without having to hard code it each time (or at least plug it in upon definition or screen initiation so I don't have to copy/paste code each time.)
For example, perhaps passing in a set of 2 coordinate pairs to draw a line displayable, such that at different points in my game the line could connect different pairs of points. I know this is trivially easy to achieve by just resizing and reorienting the line as a normal displayable, but I'd like to be able to do it as a UDD to better understand UDD and achieve more complex renders.
If anyone could explain (or better show me) how, I would be really grateful.
For example, perhaps passing in a set of 2 coordinate pairs to draw a line displayable, such that at different points in my game the line could connect different pairs of points. I know this is trivially easy to achieve by just resizing and reorienting the line as a normal displayable, but I'd like to be able to do it as a UDD to better understand UDD and achieve more complex renders.
If anyone could explain (or better show me) how, I would be really grateful.