actor changing attribute of other actor

Can an actor change attribute of another actor without going thru a game attribute?
so far I notice that its either change self.xxx to game.xxx
On the pop up menu there is no other "actor" listed.
Can i replace self.xxx by anotheractor.xxx?
so far I notice that its either change self.xxx to game.xxx
On the pop up menu there is no other "actor" listed.
Can i replace self.xxx by anotheractor.xxx?
Comments
you open/unlock the behaviors of the actorInstance that will do the controlling
drag in a behavior and reference the other actor with an expression
> Current scene > layers > layer that actor is in > the actor > its attribute you want to change
MH
Thanks for the answer! It works good! Here is another question.
I'm having an actor spawn. Is there a way I can have that "change attribute" be done on a prototype? or on the one being spawn? because its a command that spawns it...is there a way i can have that change attribute rule in the actor being spawn?
however, there are some little tricks that might work to give the effect you want.
for example:
you could create a game.Attribute (Index type as IMO this uses the least resources) and leave it 0
on your prototype that is spawned have a 1st behavior:
changeAttribute: game.Index To: 1
on the actor you want to change:
Rule: when
Attribute: game.Index = 1
--change.Attribute: self.Whatever??
when you want this to happen with every spawning …
on the spawner … just before the spawn behavior
--changeAttribute: game.Index To: 0
good luck!
MH