Simpler than using tables?
Have you tried what i said? it worked? I never used spritesheets, but i suppose it will work.
PS: a table is like a lot of variables inside a BIG variable… [import]uid: 116842 topic_id: 30559 reply_id: 122606[/import]
Simpler than using tables?
Have you tried what i said? it worked? I never used spritesheets, but i suppose it will work.
PS: a table is like a lot of variables inside a BIG variable… [import]uid: 116842 topic_id: 30559 reply_id: 122606[/import]
Anybody?
I just want to now how to add my sprite to the table and call it in the same way as the leafs?
I am really struggling as I can find no real resource to do this.
Is this the way to do this? maybe not
[import]uid: 127675 topic_id: 30559 reply_id: 122607[/import]
Sorry correo,
I just posted as you did.
I am not sure I get you, would you kindly explain it a little more clearly please.
thankyou for replying too [import]uid: 127675 topic_id: 30559 reply_id: 122608[/import]
Damn.
Declare a table.
And use it like all tables.
Why I can imagine, that you didn’t make any code nor try?
Try, search and ask.
PS: Try something, ( just ) 2 or 3 times, and if you can’t, I’ll explain.
[import]uid: 116842 topic_id: 30559 reply_id: 122609[/import]
Haha, i understand your name now!!! [import]uid: 116842 topic_id: 30559 reply_id: 122610[/import]
hi, I didnt mean to come across as not being thankful.
I have tried messing with the tables for an hour or two this morning; I would never dream of not trying anything that someone has suggested. Infact its pretty exciting to get replies with suggestions.
I apologise if Ive offended you.
My issue is that I am learning, I have sprite sheets and animation down no problem, I can modulise code and bring it into the main.lua.
As for searching I have, both here and on the internet but nothing relates to sprites within a table.
Thanks anyway, I will keep looking. [import]uid: 127675 topic_id: 30559 reply_id: 122611[/import]
I’m not angry, i’m just an asshole.
Is there any error saving the sprites in a table? or the error is other?
Can i see the new code with tables?
I was thinking it was as easy as:
images = { }
images[#images + 1] = display.newSprite( sheet, { name=“dandelion”, start=1, count=99, time=250 } )
images[#images + 1].myName = “dandelion”
images[#images + 1]:addEventListener(“collision”, ondandelionCollision) [import]uid: 116842 topic_id: 30559 reply_id: 122612[/import]
And one thing i saw:
dandelion:addEventListener(“collision”, dandelion)
You should care naming the variable same as a function. If you name the function like something what he is doing like ondandelionCollision would be better ( that’s what i see everywhere hehe ) [import]uid: 116842 topic_id: 30559 reply_id: 122613[/import]
I see what your getting at ( not the a*****e thing)lol
I was just adding the spritesheet reference to the table and calling the external dandelion.lua.
I will give it another go.
thank you [import]uid: 127675 topic_id: 30559 reply_id: 122614[/import]
Sorry, but i didn’t understand:
I see what your getting at ( not the a*****e thing)lol
and the asterisk are not helping 
( I’m spanish and that doesn’t help )
I couldn’t understand, too:
I was just adding the spritesheet reference to the table and calling the external dandelion.lua.
i imagine that you are saying that you were mixing the two codes, or something like that. [import]uid: 116842 topic_id: 30559 reply_id: 122616[/import]
Okok, you missed an “e” in your. Google Translator told me ;). [import]uid: 116842 topic_id: 30559 reply_id: 122617[/import]
*UPDATE*
I have eventually solved my problem.
Thanks go out to my Spanish friend for suggestions which guided me to the correct path.
I am a happy man
Rock on! [import]uid: 127675 topic_id: 30559 reply_id: 122624[/import]
I have eventually solved my problem.
What did u do? and why eventually? [import]uid: 116842 topic_id: 30559 reply_id: 122625[/import]