Hello, how do something like this:



Someone can help me? 
[import]uid: 51673 topic_id: 8817 reply_id: 308817[/import]
Hello, how do something like this:



Someone can help me? 
[import]uid: 51673 topic_id: 8817 reply_id: 308817[/import]
If you are using physics you should use collision detection and a function stating that if the button is pressed AND the two objects are touching then do “something”.
http://developer.anscamobile.com/content/game-edition-collision-detection
Otherwise you could state if the player’s x and y coords were as such that they were close enough to touch the box, the event would trigger then when the button is pressed.
Peach
[import]uid: 52491 topic_id: 8817 reply_id: 33398[/import]
I resolve it in this way:
Button have many functions, but this functions are hidden.
Example:
Explode=false
local buttonHandler = function( event )
if Explode == true then
explode.isVisible=true
end
end
local function onLocalCollision( self, event )
if event.phase == “began” then
Explode=true
etc… [import]uid: 51673 topic_id: 8817 reply_id: 33615[/import]