How do I adress the object?

Get help using Construct 2

Post » Fri Feb 05, 2016 1:47 pm

This is some weird logic either i'm missing something.

This piece of code should change animation of initial (clicked) object and neighbouring object if it's animation is similar to initial object's. I adress them through "relX" and "relY" vars - their relative coords in array assigned when created - because it's easy in my current project.

Problem. As for now, it only changes initial's animation (event 35). However, it passes event 34 where neighbour's animation (stored in array "base") is checked.

Image

Any ideas why module doesn't meets event 36's conditions?
I'll provide more info if needed.
B
8
S
2
Posts: 56
Reputation: 1,021

Post » Sat Feb 06, 2016 7:04 pm

Bump maybe
B
8
S
2
Posts: 56
Reputation: 1,021

Post » Sat Feb 06, 2016 11:38 pm

You're picking one module with the mouse and that module is the only one picked for all sub-events. If you want to pick a different module in a sub-event you'll need to 'Pick all' first.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,610

Post » Sun Feb 07, 2016 9:18 am

I Agree with @ramones ,
about you need to pick all or by closest which every your trying to do.

My only ? , Is from what I under stand both 35 and 36 are the exact same thing. Or am I wrong?
B
29
S
13
G
10
Posts: 355
Reputation: 8,317

Post » Sun Feb 07, 2016 12:50 pm

ramones wrote:You're picking one module with the mouse and that module is the only one picked for all sub-events. If you want to pick a different module in a sub-event you'll need to 'Pick all' first.


That sounds like a solution! Thanks, i'll try it.
Carbincopy wrote:I Agree with @ramones ,
about you need to pick all or by closest which every your trying to do.

My only ? , Is from what I under stand both 35 and 36 are the exact same thing. Or am I wrong?

Well, no, they have different "relY" variable.
B
8
S
2
Posts: 56
Reputation: 1,021


Return to How do I....?

Who is online

Users browsing this forum: Artpunk, Cool Gamez, marcoscodas and 11 guests