nope 'cause 'mySprite' isn't the name of an object, but the name of an objectType. The object you have on your canvas are instances from this objectType.
There's two ways to refer to a specific instance:
- using IID in expression
To pick you have to isolate an object via a condition.
It could be for example
- mouse: is overlapping this object
- object: pick by Unique ID
- System: pick nth instance of an objectType
- object: myVar = something
Any condition for which the specific instance will be true will initiate the picking of this specific instance, and then you'll be able to use it and only it in an action
The other one is using IID in expression. Each instance of an objectType has an Instance ID.
(Not the same as UID, Unique ID is a Unique number identifying all objects present in your layout, whereas IID are assigned by objectType)
Then via this IID you can do something like
System: Every Tick :
-> Sprite: Set angle to angle(self.X,self.Y,Sprite((self.IID+1)%Sprite.Count).X,Sprite((self.IID+1)%Sprite.Count).Y)
Basically each Sprite will angle toward the next in the IID list. (I used that in cubemaze to draw the ellipse in the menu)