Search found 53 matches

by Fourex
Sat Jan 09, 2010 8:26 am
Forum: General
Topic: This is the first real problem I've run into...
Replies: 7
Views: 2121

This is the first real problem I've run into...

So, I'm trying to create a simple tile map. I have this: z = { {0, 0, 1, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 1, 0, 0}, {2, 2, 3, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 1, 0, 0}, {2, 2, 2, 2, 2, 2, 2, 3, 0, 0}, {0, 0, 0, 0, ...
by Fourex
Sat Jan 09, 2010 7:41 am
Forum: General
Topic: More lua help
Replies: 2
Views: 1281

Re: More lua help

Thanks!
by Fourex
Sat Jan 09, 2010 1:41 am
Forum: General
Topic: More lua help
Replies: 2
Views: 1281

More lua help

So, I have a table,

Code: Select all

z = { {1, 2, 3, 4},
		{5, 6, 7, 8},
		{9, 10, 11, 12}
}
How do I call the different parts of the tables within "z"? For example, how get the third value in the second table (7) to use in a print function?
Many thanks!
by Fourex
Sun Jan 03, 2010 9:00 pm
Forum: General
Topic: Please help a Lua newb?
Replies: 4
Views: 1675

Re: Please help a Lua newb?

Thanks! Now the code works, and I understand slightly more about ipairs.
by Fourex
Sun Jan 03, 2010 8:36 pm
Forum: General
Topic: Please help a Lua newb?
Replies: 4
Views: 1675

Re: Please help a Lua newb?

Because x is set to 0 only once, so in the second frame it will be higher, however, the usual lua solution is: for i, v in ipairs(a) do love.graphics.print(v, 100+(x-1)*10, 150) end So, that sorta works. I don't get an error, but all the numbers are on top of one another. And I don't understand at ...
by Fourex
Sun Jan 03, 2010 8:25 pm
Forum: General
Topic: Please help a Lua newb?
Replies: 4
Views: 1675

Please help a Lua newb?

So, just got started with Love, (and programming in general) so I don't know all that much about how Lua works. I'm experimenting with tables, and have run into a problem when trying to repeat something for each argument in a table. I'm trying to replicate what I have done in part A with part B, but...
by Fourex
Thu Nov 12, 2009 12:44 am
Forum: General
Topic: Avatars: OBEY!
Replies: 763
Views: 1025838

Re: Avatars: OBEY!

OBEY...
by Fourex
Wed Nov 11, 2009 6:48 pm
Forum: General
Topic: How large is the Love window?
Replies: 2
Views: 1364

Re: How large is the Love window?

thanks!
by Fourex
Wed Nov 11, 2009 6:45 pm
Forum: General
Topic: How large is the Love window?
Replies: 2
Views: 1364

How large is the Love window?

Title says it. What are the dimensions of the window Love runs in?
by Fourex
Wed Nov 11, 2009 7:44 am
Forum: General
Topic: I need help with absolute values!
Replies: 2
Views: 3037

Re: I need help with absolute values!

*sigh* it seems like all of the problems I have with love are so simple to fix... I guess that's a good thing though.