Search found 2 matches

by effortlessartist
Wed Sep 11, 2013 2:08 pm
Forum: Support and Development
Topic: player={} table initiation, sockmonkee dev
Replies: 9
Views: 3099

Re: player={} table initiation, sockmonkee dev

I think the reason the first one doesn't work is because (or at least you do this in javascript): enemy = { x = math.random( 1, 100 ), y = math.random( 1, 100 ), goalX = x + 50 goalY = y + 50 } Should be: (Not sure if this.x is the right thing, but maybe theres something with a similar use in lua) e...
by effortlessartist
Wed Sep 11, 2013 2:42 am
Forum: Support and Development
Topic: player={} table initiation, sockmonkee dev
Replies: 9
Views: 3099

player={} table initiation, sockmonkee dev

So I'm watching sockmonkee's video's on youtube and he keeps using this: player = {} player.x = 5 player.y = 200 player.xvel = 5 Why does he initiate a table and then create variables/methods based on the table? I don't know what this is called in programming or what to search google for to get a wh...