Getting an actor to read another actor's self attribute...possible?

Good morning fine fellows of the Game Salad forums!
I have two actors, one which will move and collide with the other which is static. The static one has an integer self attribute which it randomly sets at the start as a number between 1 and 5, and loads a different graphic accordingly (they are different kinds of traps).
I'd like for the moving actor to run a different animation when it collides with the static actor, depending on the number that static actor has given itself in the self integer attribute. It has to be a self attribute as there will be multiple static actors so a game attribute doesn't work in this case (it'd make all the static actors the same type of trap)
Is there a way to do this?
I have two actors, one which will move and collide with the other which is static. The static one has an integer self attribute which it randomly sets at the start as a number between 1 and 5, and loads a different graphic accordingly (they are different kinds of traps).
I'd like for the moving actor to run a different animation when it collides with the static actor, depending on the number that static actor has given itself in the self integer attribute. It has to be a self attribute as there will be multiple static actors so a game attribute doesn't work in this case (it'd make all the static actors the same type of trap)
Is there a way to do this?
Comments
You have to unlock the moving actor. Then when you go into the actor and then into the attribute selector there is a new option, "Current Scene". Click on that and go into "layers" then choose the layer the static actor is in. You will see that actor. From there you can access all of its personal attributes.
This way works however it would probably be easier just to make that a game attribute.
Hope this helps.
If I were you I would probably just make Game Attributes. It stops the confusion of having lots of different instances of actors that you can't edit all from one place.
You've been a tremendous help, thanks so much!