GML Sprite subimage relating to text

In my game I have a speech box, and the speech is controlled by a sprite (eg. the first sentence is sub-image 0 in the sprite, the 2nd is sub-image 1 etc...). When the player presses enter, the sprite moves on to the next sub-image.
There is also a headBox object that shows the head of the person that is speaking. This sprite is controlled the same way.
I'm looking for a way, in the least code possible, to change the sprite in the headbox to relate to the person speaking.
I know what I just wrote is confusing, but I can't make it any less so, so if you have any questions to do with my question, please ask.


if the speech and the headbox are different objects,you can make a press enter event for object headbox and do the same thing,so,when the player press enter,both objects change sprite!;)