drag objet location

Get help using Construct 2

Post » Mon Jun 04, 2012 3:13 pm

hello I'd like to drag an object location (it is good) but a rule comes into account is: there must be at a given distance from point X, otherwise it returns to its origin (the point X is image point) I look at some examples but I do not understand sorry
B
6
Posts: 31
Reputation: 862

Post » Mon Jun 04, 2012 3:46 pm

I made an example for you using the distance expression, and some instance variables:

DragDrop_CheckRange (r92)
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Mon Jun 04, 2012 4:20 pm

I look at her thank you
B
6
Posts: 31
Reputation: 862

Post » Mon Jun 04, 2012 5:34 pm

ok I just tried and it does not take into account the distance here is what I did ...

Mrx322012-06-04 17:35:45
B
6
Posts: 31
Reputation: 862

Post » Mon Jun 04, 2012 6:47 pm

You want to check the distance between the instance variables and the object you are dragging, so you should probably use PositionX and PositionY instead of MConstructionSuite.ImagepointX(2) and ...Y(2) in the distance expression.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Mon Jun 04, 2012 7:26 pm

I can not because I want to position it has a specific point on the image .... Anyway I can if I take the target value and the position I in X and Y but the problem is that I have several points of same type or it can be positioned

I let you look at yours if you have the courage ... I warned it was rough ...

What I wanna do is drag the trunk of one of four wooden suport

https://rapidshare.com/files/3233852809/Castel2.capxMrx322012-06-04 19:32:22
B
6
Posts: 31
Reputation: 862

Post » Mon Jun 04, 2012 8:13 pm

I'm sorry, I don't understand what you are trying to do with the "BoisH" object, where do you want the player to put it, and when do you want it to not be possible? And what object or position does it have to be in range of?
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Mon Jun 04, 2012 8:28 pm



I hope it will help
B
6
Posts: 31
Reputation: 862


Return to How do I....?

Who is online

Users browsing this forum: flemmig, MisterAqua, Nifl and 28 guests