How to handle the press button and slide to other button(want to do a kids piano)

How to handle the press button and slide to other button , I want to do a kids piano app.

I’m new to Lua, Can anyone help me ?

thanks in advance. [import]uid: 112598 topic_id: 36880 reply_id: 336880[/import]

For Pete’s sake, if you want help the first thing you need to do is phrase your question properly - I can’t image that anyone has enough information to help, based on your short short short post.

So, in the spirit of helpfulness I’ll give you another chance :wink:

What is your problem exactly?

  1. That you don’t know where to start at all?
  2. Press button and slide: what exactly do you mean with “press button and slide”, and what do you want the result to be? I assume you mean that a user touches a certain key, holds his finger down but moves to a new key. What do you want this to do? Bend the one note down to the new note, or start playing a new note?

Cheers,
Thomas [import]uid: 70134 topic_id: 36880 reply_id: 145153[/import]

@Thomas6:
From what I gathered, she/he’s trying to make buttons that press down when you slide over them (like the GarageBand piano for iPad)

@Chaifa139:
That’s done with a bounds check for each note - iterate through each one and check if the event is occurring inside of it’s bounds. If it is, do your note press/play note/whatever you want to do.

I did it a while ago for a platformer that I never finished - the left/right buttons.

C [import]uid: 147322 topic_id: 36880 reply_id: 145169[/import]

For Pete’s sake, if you want help the first thing you need to do is phrase your question properly - I can’t image that anyone has enough information to help, based on your short short short post.

So, in the spirit of helpfulness I’ll give you another chance :wink:

What is your problem exactly?

  1. That you don’t know where to start at all?
  2. Press button and slide: what exactly do you mean with “press button and slide”, and what do you want the result to be? I assume you mean that a user touches a certain key, holds his finger down but moves to a new key. What do you want this to do? Bend the one note down to the new note, or start playing a new note?

Cheers,
Thomas [import]uid: 70134 topic_id: 36880 reply_id: 145153[/import]

@Thomas6:
From what I gathered, she/he’s trying to make buttons that press down when you slide over them (like the GarageBand piano for iPad)

@Chaifa139:
That’s done with a bounds check for each note - iterate through each one and check if the event is occurring inside of it’s bounds. If it is, do your note press/play note/whatever you want to do.

I did it a while ago for a platformer that I never finished - the left/right buttons.

C [import]uid: 147322 topic_id: 36880 reply_id: 145169[/import]

For Pete’s sake, if you want help the first thing you need to do is phrase your question properly - I can’t image that anyone has enough information to help, based on your short short short post.

So, in the spirit of helpfulness I’ll give you another chance :wink:

What is your problem exactly?

  1. That you don’t know where to start at all?
  2. Press button and slide: what exactly do you mean with “press button and slide”, and what do you want the result to be? I assume you mean that a user touches a certain key, holds his finger down but moves to a new key. What do you want this to do? Bend the one note down to the new note, or start playing a new note?

Cheers,
Thomas [import]uid: 70134 topic_id: 36880 reply_id: 145153[/import]

@Thomas6:
From what I gathered, she/he’s trying to make buttons that press down when you slide over them (like the GarageBand piano for iPad)

@Chaifa139:
That’s done with a bounds check for each note - iterate through each one and check if the event is occurring inside of it’s bounds. If it is, do your note press/play note/whatever you want to do.

I did it a while ago for a platformer that I never finished - the left/right buttons.

C [import]uid: 147322 topic_id: 36880 reply_id: 145169[/import]

For Pete’s sake, if you want help the first thing you need to do is phrase your question properly - I can’t image that anyone has enough information to help, based on your short short short post.

So, in the spirit of helpfulness I’ll give you another chance :wink:

What is your problem exactly?

  1. That you don’t know where to start at all?
  2. Press button and slide: what exactly do you mean with “press button and slide”, and what do you want the result to be? I assume you mean that a user touches a certain key, holds his finger down but moves to a new key. What do you want this to do? Bend the one note down to the new note, or start playing a new note?

Cheers,
Thomas [import]uid: 70134 topic_id: 36880 reply_id: 145153[/import]

@Thomas6:
From what I gathered, she/he’s trying to make buttons that press down when you slide over them (like the GarageBand piano for iPad)

@Chaifa139:
That’s done with a bounds check for each note - iterate through each one and check if the event is occurring inside of it’s bounds. If it is, do your note press/play note/whatever you want to do.

I did it a while ago for a platformer that I never finished - the left/right buttons.

C [import]uid: 147322 topic_id: 36880 reply_id: 145169[/import]