Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 11:40 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: CloneObject Question
PostPosted: May 27th, 2007, 10:20 am 
Offline

Joined: September 11th, 2006, 2:38 pm
Posts: 125
I want to click lclick with the mouse and then let an object to be cloned at the x and y coordianatiion of the mouse to be dragged later.


Top
 Profile  
 
 Post subject:
PostPosted: May 27th, 2007, 6:00 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi

I created a sample. Is this what you are looking for?

I hope this helps.

Kind Regards,


You do not have the required permissions to view the files attached to this post.

_________________
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: May 27th, 2007, 7:52 pm 
Offline

Joined: September 11th, 2006, 2:38 pm
Posts: 125
Excellent
Thanks for your Time.
Is there a way to let the square stick to the mouse until i click right click ?
anyway your sample is enough .


Top
 Profile  
 
 Post subject:
PostPosted: May 27th, 2007, 9:15 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi

I think it would become awkward to try to do this combined with cloning, using the standard 'move object to cursor' action. When I try to add this, the original object, not its clone attaches to the cursor.

I think a script would be needed, and I can't locate the script version of this action in the script guide.

Perhaps, a Forum member with more scripting experience could create a work-a-round for this effect.

Kind Regards,

_________________
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: May 27th, 2007, 9:28 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Each clone has it's own ID number that can be used to manipulate the clone. However, if you are clicking on the actual clone use 'this' to manipulate the object. For example;

this.Hide() will hide the object clicked.

As for click n grab, it's achieved using get mouse position and set object position within a endless loop, broken on right click. I've got an example of this that is part of some functions that I was supposed to upload to my website this last week, before getting side tracked. I'll try and get it finished this week and post a note.

Mack.

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: May 27th, 2007, 9:44 pm 
Offline

Joined: September 11th, 2006, 2:38 pm
Posts: 125
Thanks Stephen
you did the most of the work


Thanks mackavi

You are always helping.
we're waiting to your post


Top
 Profile  
 
 Post subject:
PostPosted: May 27th, 2007, 9:52 pm 
Offline

Joined: September 11th, 2006, 2:38 pm
Posts: 125
I try now to do it by
using trigger 0.01s
square.SetPosition(mouseX,mouseY)


it stick but now searching for release it


Top
 Profile  
 
 Post subject:
PostPosted: May 28th, 2007, 12:06 am 
The sample I've posted does nothing with the cloning, but it shows a method of picking up an object, moving it, and upon release having it return to its original position.

Perhaps you might be able to incorporate this technique into your pub.

I use these principles to have a student pick up a pencil and mark/highlight specific words. The highlighting works only if the correct target object is selected as the pencil's target.

This example was produced, after much trial and error, by Steve H and me -- Steve did most of the work :D

HTH


Top
   
 
 Post subject:
PostPosted: May 28th, 2007, 2:25 pm 
Offline

Joined: September 11th, 2006, 2:38 pm
Posts: 125
Thanks sentosa
It should help somwhow.
Thanks again for participation


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 50 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group