cloud and water drop

if i have two objects let’s say cloud and a water drop …

and i want to make it look like its raining … such that the water drop drop from the cloud every 5 second

and how can i get the Coordinates of the cloud object ?
[import]uid: 96162 topic_id: 35033 reply_id: 335033[/import]

The coordinates of any display object are their .x and .y properties. You can find out much more than I can tell you here in the API documentation (link at top.)

To make it rain, you’d want to create a loop which creates lots of water drop images moving down the screen. Particle Candy is very good for this type of animation because its a library which handles the random nature and positioning of the images for you. It’s not hard to do and is an excellent exercise to learn from.

Ask back here if you need help. [import]uid: 8271 topic_id: 35033 reply_id: 139314[/import]

The coordinates of any display object are their .x and .y properties. You can find out much more than I can tell you here in the API documentation (link at top.)

To make it rain, you’d want to create a loop which creates lots of water drop images moving down the screen. Particle Candy is very good for this type of animation because its a library which handles the random nature and positioning of the images for you. It’s not hard to do and is an excellent exercise to learn from.

Ask back here if you need help. [import]uid: 8271 topic_id: 35033 reply_id: 139314[/import]

can you explain more with a code , and for note only … the object i want to drop from is moving

[import]uid: 96162 topic_id: 35033 reply_id: 142323[/import]

[lua]
local drop = display.newImage(“drop.png”)
drop.x, drop.y = 50,-50
transition.to(drop,{time=3000,x=300,y=display.contentHeight+50})
[/lua]

Makes the water drop image fall from above the screen to below the screen, at an angle, in 3 seconds. [import]uid: 8271 topic_id: 35033 reply_id: 142345[/import]

can you explain more with a code , and for note only … the object i want to drop from is moving

[import]uid: 96162 topic_id: 35033 reply_id: 142323[/import]

[lua]
local drop = display.newImage(“drop.png”)
drop.x, drop.y = 50,-50
transition.to(drop,{time=3000,x=300,y=display.contentHeight+50})
[/lua]

Makes the water drop image fall from above the screen to below the screen, at an angle, in 3 seconds. [import]uid: 8271 topic_id: 35033 reply_id: 142345[/import]