PDA

View Full Version : Assign a function to a Table???



CT_Bolt
March 7th, 2006, 17:46
:D Well... Hello my fellow PSP Lua coders... :) OK so I know it's posible to create a table with a function, :confused: I just don't know exactlly how to do what I need to do, which is this:

1. I am creating a ScrollingCanvas table and I want to assign the function 'Move' to the table, to move the picture(canvas) around the screen using the tables position data (X, Y).

2. The question for you is: How do I create the table, so I can call the move method like this:
AScrollingCanvas:Move(X, Y)
Please Help. :confused:

PS. If I didn't give enough information, plz just PM me. ;)

flashmasterfong
March 17th, 2006, 11:23
Come on man your suposed to know this, I recommend you look for a tutorial.

CT_Bolt
March 19th, 2006, 05:58
I did figure it out but, I couldn't find any actual class tutorial so...
I wrote one: My class tutorial: Click Here (http://lordlaurin.lo.funpic.de/devboard/viewtopic.php?t=54)