Bug ? Same instance timer and AddTo

Bugs will be moved here once resolved.

Post » Tue Apr 23, 2013 4:07 pm

Link to .capx file (required!):
https://dl.dropboxusercontent.com/u/8186155/testTimer.capx

Steps to reproduce:
1. Create a sprite with a timer inside
2. Duplicate it on a layout
3. When timer reach 0, add 1 to variable


Observed result:

Error => when you have 2 instances only 1 is added to the var instead of 2.

Expected result:

var = var +1 +1

Browsers affected:
Chrome: yes


Operating system & service pack:
Win7-64
Construct 2 version:
    125
B
39
S
15
G
5
Posts: 295
Reputation: 6,089

Post » Tue Apr 23, 2013 4:49 pm

You need to specify a for each condition so that it does it for each sprite instead of just picking one of them at random. Here is your events fixed to work the way you want them. Hope this helps:

B
49
S
11
G
10
Posts: 1,833
Reputation: 14,428

Post » Tue Apr 23, 2013 6:09 pm

Closing as not a bug.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 5 guests