How do I get the value of an object i am bouncing to

Just started using Construct 2? Post your questions here

Post » Wed Oct 28, 2015 9:42 pm

hello. i have a question come to mind. how do i get the value of the object i am bouncing to, but which is an instance of the same object as self.

let's say i have created one object of circle that changes color when it bounces with another circle. Depending on what color of the other circle instance it bounces with, it changes to a specific color. for example, when a black circle (circle-self) meets with a white circle (circle-bounceTo) , the black circle turns gray and the white circle would turn black. While a gray circle meets a white circle it would turn white and the white one turns gray; and if gray one meets a black one it would turn black and the black one turns gray, for example.

my question is, how do i tell what is the color of the other circle that i (circle-self) am bouncing with at the moment. how do i tell if the other circle is black or white or if it's gray?

is there any way i can recognize the other object i am interacting with and access its current value of its instance variable while it is the same object as i am :?: :?:
B
4
Posts: 4
Reputation: 208

Post » Thu Oct 29, 2015 10:11 am

I tried something. Maybe there is a better way, but it works
https://drive.google.com/file/d/0B5FlDY ... sp=sharing

Only two sprites at the same time can overlap, if there are more it doesn't work.
B
24
S
3
G
1
Posts: 451
Reputation: 2,165

Post » Thu Oct 29, 2015 2:02 pm

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Oct 29, 2015 3:16 pm

I guess this is the easiest way


That's quite neat. I'm over and over mesmerized what is already implemented in Construct.
B
24
S
3
G
1
Posts: 451
Reputation: 2,165

Post » Thu Oct 29, 2015 11:39 pm

thank you :) i am playing around with it. LittleStain's answer totally solved my question in fact both answers open the door for me. thank you very much. :D
B
4
Posts: 4
Reputation: 208


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest