How do I identify certain family item?

Get help using Construct 2

Post » Tue Mar 04, 2014 7:48 pm

Hello,
I need some pointers here.
I have several cloned objects that i'w set into one family.
I need to somehow identify selected object (with touch controll) in order to set certain rules for their interaction.

Thanx!
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Tue Mar 04, 2014 8:15 pm

Your question is missing some details. Under what conditions do you want to identify (or pick, more accurately) these objects? What certain rules do you need to set?
B
57
S
15
G
11
Posts: 912
Reputation: 12,606

Post » Tue Mar 04, 2014 9:24 pm

Well i need something like this.
When touch/drag to identify this object (A) so that i can set event
when he (A) is dragged and is overlaping second object (B) to be dropped and at the same time that second object (B) is to be moved to starting position of (A) object automaticaly.

i have 4 objects in line that are dragable only on X axis and when i drag one that he switch places with one next to him.

eg. when street hustler has 3 matchstiks boxes and shuffles them.
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Mon Mar 10, 2014 10:39 am

Use Instance variables if you don't know how to then try this instance variables tutorial
https://www.scirra.com/tutorials/806/instance-variable
B
249
S
39
G
15
Posts: 1,952
Reputation: 40,579

Post » Mon Mar 10, 2014 10:56 am

When you use "ob object touched" it already "picks" that specific object for you. Under the events of this condition, you will exclusively be manipualting this single object, not the whole family.

The difficulty you are facing now is actually very important because it's a door in c2 that when you open, you get +5 levels or so:) It's called "picking", you should definately read about it in forums, in manual and watch youtube videos. Believe me, you will thank me later when you solve the picking with all aspects.
B
18
S
4
G
1
Posts: 332
Reputation: 3,149

Post » Mon Mar 10, 2014 1:12 pm

thanks guyz...
ill look into "picks" becouse it looks like it's essential stuff for proper development.

BR
B
26
S
11
G
2
Posts: 669
Reputation: 5,038


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, Google [Bot], shawnzien, tatogame and 7 guests