How do I drag a newly created object instantly

Get help using Construct 2

Post » Thu Jun 18, 2015 2:15 am

You can try making at start of layout the first ball to have the "Drag & Drop" behavior disabled, and when the second object has created, pick him by UID and set the bahavior "Drag & Drop" enabled for the object with this UID.
This is a possibility, and will be nice if you can do this with Construct 2.
Liked something I say?
Tip. My Bitcoin address: 1PLaeKmXQ8vEdGGJqXMq3KyB8hxeddxeSv
B
24
S
7
G
4
Posts: 326
Reputation: 3,878

Post » Thu Jun 18, 2015 2:18 am

Oh, sorry. Your problem in this is already solved to make the next ball draggable. Way to bring it to the front so it has the effect of popping out of the original sprite? My poor suggestion is using the action "(OBJECT) set to top of layer".
Liked something I say?
Tip. My Bitcoin address: 1PLaeKmXQ8vEdGGJqXMq3KyB8hxeddxeSv
B
24
S
7
G
4
Posts: 326
Reputation: 3,878

Post » Thu Jun 18, 2015 10:04 am

JMKit wrote:Hey, codah - not late at all thanks for your input!
So I thought that example was just what I was looking for, however if you put any kind of pattern on that green square and drag it out, you'll see it's still dragging from underneath, is there no way to bring it to the front so it has the effect of popping out of the original sprite, seems everything i try just makes it come from underneath O_o


Is there a reason that won't work for you?

edit: how about this. Sorry I'm pretty rusty.
https://www.dropbox.com/s/nxc1fadm55ugp4t/drag_from_sprite_top.capx?dl=0
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Thu Jun 18, 2015 3:10 pm

Oh, sorry. Your problem in this is already solved to make the next ball draggable. Way to bring it to the front so it has the effect of popping out of the original sprite? My poor suggestion is using the action "(OBJECT) set to top of layer".
:) That's ok I appreciate anyone weighing in on this.

Is there a reason that won't work for you?


Your example there works perfectly, strangely however when I recreate it, it drags the first sprite underneath but then all the rest on top, I have added more 'draggable' sprites into the same family and it seems to work the same for all 3 (so far) so it's like one last little peace of the puzzle and it'll be perfect :D

Image

(only changes I made was naming the family 'Draggables' instead of 'other sprite' and making the family instance variable 'Dragid' instead of 'id')

I'll keep tweaking it, but if anyone sees any reason why the first is going under and the rest over, let me know :)
B
16
S
4
Posts: 50
Reputation: 1,035

Post » Sat Jun 20, 2015 9:06 pm

Ok so I thought I'd post my findings in case anyone looks through this thread in the future,

This is what I came up with (based of codahs suggestion!) just tweaked for my purposes of bringing out a new instance on top and moving to a new layer all in one click / drag out
Image

Thanks to everyone for your suggestions :)
B
16
S
4
Posts: 50
Reputation: 1,035

Post » Sat Jun 20, 2015 10:18 pm

@JMKit, np. I've used the bring to top trick and solved problems with my games.
Liked something I say?
Tip. My Bitcoin address: 1PLaeKmXQ8vEdGGJqXMq3KyB8hxeddxeSv
B
24
S
7
G
4
Posts: 326
Reputation: 3,878

Previous

Return to How do I....?

Who is online

Users browsing this forum: Lancifer and 57 guests