Sprite Issues

Get help using Construct 2

Post » Tue Jul 02, 2013 5:18 pm

Hello again!

Is there a way to give the same sprite 2 different behaviors? for example if I'm using the same sprite to do the floor section of a map but only want to make one of the "squares" solid could I do that?

I suppose the easiest way I can put it is, two of the same sprite but one having a behavior and one not ;P

Thanks!
B
4
S
1
Posts: 12
Reputation: 507

Post » Tue Jul 02, 2013 5:33 pm

yes, this is where picking or filtering the objects come's in

if you would have 2 same sprites, and say when clicking on sprite
(this filters the sprite) and then say > sprite behavior disable
this would work,

the same thing can be done with object variables,
add a variable "nr" to sprite and set var to 1 and 2 on the other
then condition sprite.nr = 1 > sprite behavior solid > disable
this would also workvtrix2013-07-02 17:35:47
ImageImage
B
70
S
21
G
7
Posts: 827
Reputation: 10,052

Post » Tue Jul 02, 2013 5:42 pm

Some behaviours allow you to toggle their status to enabled on/off on each instance, in the properties bar. Others, like solid, don't yet (although I believe that functionality is coming to all behaviours, possibly soon).

Otherwise, if you have a reliable way to detect that sprite's IID, you could create an event System: On start of layout (or whenever); System: Pick [sprite] instance () -> Sprite: Set Solid disabled
B
57
S
15
G
11
Posts: 912
Reputation: 12,606

Post » Wed Jul 03, 2013 5:40 pm

Thanks for the responses! Helped a bunch!
B
4
S
1
Posts: 12
Reputation: 507


Return to How do I....?

Who is online

Users browsing this forum: nahima and 12 guests