How do I spawn a specific sprite from a family.

Get help using Construct 2

Post » Thu Feb 19, 2015 10:09 am

Hi Everyone,

I am trying to spawn a specific sprite from a family.

Specifically, when the user clicks on a sprite, I want that sprite to spawn in a box below.

All the sprites are in the same family.

This feels like it should be so simple, yet I'm struggling, I'm obviously having a dumb day!

Suggestions are appreciated :)
B
13
S
6
Posts: 130
Reputation: 1,553


Post » Thu Feb 19, 2015 10:27 am

Coin-coin le Canapin wrote:https://www.scirra.com/forum/search.php?keywords=spawn+family&terms=all&author=&fid%5B%5D=147&sc=1&sf=titleonly&sr=topics&sk=t&sd=d&st=0&ch=300&t=0&submit=Search

:]


Gah, I cant believe I didn't search the forum first (I did Google in my defence)!

Thank you Coin-coin le Canapin :]!
B
13
S
6
Posts: 130
Reputation: 1,553

Post » Thu Feb 19, 2015 11:04 am

Coin-coin le Canapin wrote:https://www.scirra.com/forum/search.php?keywords=spawn+family&terms=all&author=&fid%5B%5D=147&sc=1&sf=titleonly&sr=topics&sk=t&sd=d&st=0&ch=300&t=0&submit=Search

:]


Hi Coin-coin le Canapin,

I must be having a really really dumb day as I cant figure out how to use the nickname plugin to get what I want. I've named my sprites using the behaviour.

How do I now tell which sprite has been touched within the family?

Thanks!
B
13
S
6
Posts: 130
Reputation: 1,553

Post » Thu Feb 19, 2015 11:24 am

You must use the behavior Nickname "Nickname" property. As "nickname.nickname = …".

by the way the first Nickname is the behavior name, you can rename it if you find this redundant.

This plugin is amazingly useful when working with families.
You do not have the required permissions to view the files attached to this post.
B
12
S
7
G
7
Posts: 448
Reputation: 4,272

Post » Thu Feb 19, 2015 11:32 am

I hadn't added the nickname behaviour to the family, only the individual sprites! Oh dear :P. Time for more coffee I think!

Thank you so much Coin-coin Le Canapin! You saved the day :).
B
13
S
6
Posts: 130
Reputation: 1,553



Return to How do I....?

Who is online

Users browsing this forum: Nintend0Nerd and 10 guests