How do I Group Sprites?

Get help using Construct 2

Post » Fri Mar 10, 2017 2:54 am

is there a way to group sprites in a way i can use the group as an event instead of each sprite having the same script over and over?

ex: i have 10 different enemies grouped as "enemy" then i create an event, everytime i hit "enemy" the object(any of the enemiess that were hit) is destroyed...
B
5
Posts: 2
Reputation: 231

Post » Fri Mar 10, 2017 3:15 am

You can have multiple copies of a sprite created and they will only respond to a hit on a specific sprite without affecting the other sprites.

You can also choose sprites of the same copy by the unique UID and destroy or affect them through events.
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,790

Post » Fri Mar 10, 2017 3:59 am

@Jonhyfun

Sounds to me like you need to set up an enemy family. although I think that is not available in the free version.
B
95
S
33
G
20
Posts: 438
Reputation: 17,640

Post » Sat Mar 11, 2017 1:33 am

lamar wrote:You can have multiple copies of a sprite created and they will only respond to a hit on a specific sprite without affecting the other sprites.

You can also choose sprites of the same copy by the unique UID and destroy or affect them through events.

many thanks, but how do i create an event or action using UID? like if spriteuid26 dies....
B
5
Posts: 2
Reputation: 231

Post » Sat Mar 11, 2017 2:00 am

Jonhyfun wrote:
lamar wrote:You can have multiple copies of a sprite created and they will only respond to a hit on a specific sprite without affecting the other sprites.

You can also choose sprites of the same copy by the unique UID and destroy or affect them through events.

many thanks, but how do i create an event or action using UID? like if spriteuid26 dies....


Pick Unique UID in the sprite commands.
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,790


Return to How do I....?

Who is online

Users browsing this forum: Fenix18, Fradno, Matei511, Yahoo [Bot] and 38 guests