Sprite selection

Get help using Construct 2

Post » Fri Feb 22, 2013 5:34 am

Im wanting to find a way to select sprites individually from another from 1 type of sprite. Eg: Say I have a sprite called "monster1".
Now lets say, I want to have 5 instances of this down the screen.
I could also have it in a family group where I could action something for all 5 monsters to do at once.

What im wanting to do for example is, say the first monster sits at say x200,y200 and im wanting to do some thing to that sprite say only, change its frame or size for example or position and not effect all the other "Monster1" sprites down the page. I can do this with multiple code blocks of the same thing, specifying what is the nearest "Monster1' to the player sprite for example and if its only the same x,y-x,y postion etc, and importing 5 of the monster1 sprites on the screen labelled Monster 1 (1-5) so I know which is which And other variables, but usually I would just specify a number for each of the Monster1 sprites so I could just individually manover it or change it etc.
Currently, I cant find a way to do this, again only with families but they don't have instance number of a single sprite set that I can choose from, only manipulating them all? Maybe ive missed something here? I read about sprite(id) but I don't think it fits this?

Anyone done this before, Can it be done? Thx
Posts: 12
Reputation: 699

Post » Fri Feb 22, 2013 10:57 am

Not sure if this will help ?

UID Test
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
Posts: 1,194
Reputation: 26,482

Post » Fri Feb 22, 2013 12:47 pm

Yes that did it. I thought it was the UID somehow but had no idea how to construct the code. My example below for anyone else who needs it well this is what I constructed worked for me after reading your link a simple move sprite instance(2) X+2 pixel scroll example.
Sry I have not got a server for direct link as yet.


Posts: 12
Reputation: 699

Return to How do I....?

Who is online

Users browsing this forum: 01lifeleft and 22 guests