Drag and drop ball to perform an action: Create a hole for a ball

dragdrop

(Antonio) #1

Hello everyone! I’m new on the forum. I’m italian so sorry for my bad English. I’ve been using Hype for a while to create a simply game: you have to put a ball (created with an ellipse) in an hole (ellipse too). The ball is moved with the drag on computers and with the device tilt on mobile. The question is: how can I tell Hype that when the ball ellipse hit the hole ellipse it should move to the next scene? Hope you can understand. Thank you for the answer :smile:


(Mark Hunte) #2

Hi,

Have a look at this post.


(Greg) #3

This might work…

http://forums.tumult.com/t/hype-3-thoughts-and-feedback/801/9?source_topic_id=3317

(Mark Hunte) #4

@gasspence Hay Greg,

That link comes up as “Sorry, you don’t have access to that topic!” :crying_cat_face:


#5

Here’s that file: dnd-new_scene.hype.zip (16.6 KB)


(Greg) #6

Daniel covered it, thanks all.


(Antonio) #7

Thank you all! I’m trying to implement Daniel’s JS in my project but for now it doesn’t work (I’ll try harder). Like Mark said, the link posted by Greg still output an error, I’ll be blessed if you can restore it. I’ll let you know :smile:


(Mark Hunte) #8

Arrgh… that takes all the fun out of doing calculations yourself… :grinning: :+1:


(Greg) #9

Here’s an update to the file Daniel listed…

dnd-new_scene.hype.zip (115.1 KB)

Still no calculations, still no fun :disappointed_relieved: - but I did add jQuery touch-punch for mobile devices


(Antonio) #10

So on a mobile it won’t work with the tilt, right? No possibilities to move the “ball” with the tilt of a mobile?


(Antonio) #11

So, i understand how to let the ball move with the tilt on a mobile, it works. Another question: how can i tell hype to go to another scene when the ball (moved with the tilt) goes on another element (just like another ellipse o a rectangle)? I made it works fine only with the drag and drop. Thank you all!