N00B Question about Movement...

I am developing a test game (iPad currently) where i have a Hero who needs to be able to be moved along the ‘floor’ (left to right or right to left) to catch items that are falling from the sky. Some items are good and others he will want to hit the ground or ‘not catch’.

1.) I cannot figure out how to be able to touch the Hero and move him left to right or right to left so he can either catch the positive score items or avoid the negative score items

2.) I cannot figure out how to have random items fall from the sky at random times with different point valuations (some positive to the score and others negative to it)

I hope this makes sense and sorry if my questions are totally n00bish but any help would be so greatly appreciated.

Best Regards and thanks in advance for your time and assistance.

Steven James [import]uid: 153312 topic_id: 27546 reply_id: 327546[/import]

Hey Steven,

First things first, check out this tutorial; http://corona.techority.com/2011/02/14/controlling-a-character-with-a-d-pad/
That is for four directions but you’d obviously just use left and right.

For the spawning of objects you’d likely use math.random and have the objects in a table, or have a function for each item then use math.random to choose which function was called.

Peach :slight_smile: [import]uid: 52491 topic_id: 27546 reply_id: 111963[/import]

Reviewing now, i just wanted to say that i am a huge fan of your work Peach and follow you diligently since i have begun working/testing within Corona. Thank you for your kind and prompt reply and i will let you know what i encounter.

Best Regards,
Steven James [import]uid: 153312 topic_id: 27546 reply_id: 111973[/import]

Hey Steven, how did you go with it?

Thank you SO much for those kind words; I really appreciate it. I hope I can continue to give you reasons to follow me and my work :slight_smile:

Peach [import]uid: 52491 topic_id: 27546 reply_id: 112132[/import]