Can I check if a layer has an effect?
Posted: August 23rd, 2011, 9:27 am
Hi to all!
I am tweaking Ebberts' collission detector for a project. There are going to be a lot of layers in the comp, and some of them will work as obstacles for a collision. I want to make some of these layers obstacles, and one object to collide should detect them. So the ideal would be
if (L.effect("IsObject")(Checkbox))
to check every layer in every frame before going to the collision check. But if a layer doesn't have an effect called IsObject, the expression won't work. Is there a way to detect if a layer has an effect with particular name so I don't have to create this effect on every layer?
Regards
I am tweaking Ebberts' collission detector for a project. There are going to be a lot of layers in the comp, and some of them will work as obstacles for a collision. I want to make some of these layers obstacles, and one object to collide should detect them. So the ideal would be
if (L.effect("IsObject")(Checkbox))
to check every layer in every frame before going to the collision check. But if a layer doesn't have an effect called IsObject, the expression won't work. Is there a way to detect if a layer has an effect with particular name so I don't have to create this effect on every layer?
Regards