How do I keep my sprite from updating?

Get help using Construct 2

Post » Wed Jul 30, 2014 12:32 pm

I have a coin sprite which has multiple frames. Each frame is a different looking coin. The coin also has a instance variable to track value. Every 2 seconds I call the function itemspawn listed below.

(Coppercoin=1, silvercoin=2, goldcoin=3 etc..)

At the moment I have the coin spawning, and it changes to a random frame. When I collect the coin I get the correct value. The problem is ALL COINS update frame when a new coin is generated.

So if a gold coin spawns it will start to fall from the top of the screen, if a new coin spawns before I can get to it, the gold coin may change into a copper coin. this repeats every time a new coin sprite spawns for all coin sprite objects on screen. Any ideas on how to fix this?
You do not have the required permissions to view the files attached to this post.
B
15
S
4
Posts: 31
Reputation: 1,267

Post » Wed Jul 30, 2014 12:37 pm

@smoke84

You need to move the Set animation frame and Set value actions after the Create object action, so it will only pick that created object item, otherwise it doesn't know which specific one to set so it sets all of them.
Find all the Construct 2 games that were on Steam Greenlight here
B
35
S
9
G
7
Posts: 468
Reputation: 6,866

Post » Wed Jul 30, 2014 12:44 pm

@OddConfection

That did it, thanks for the fast reply! :D
B
15
S
4
Posts: 31
Reputation: 1,267


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 24 guests