Ok I'm Stumped.
I want to have a "Portal" sprite object which I can duplicate.
Then link the to portals together..
So when the player hits a portal,, it teleports him to the associated portal.
So I have two instance variables, State and Connection.
State being is it a entrance or exit (really just for the animation)
and Connection being a number that would link the two.. ie 0 and 0 link together.. 1 and 1 link together.
Problem when I have the player detect collision with a portal.. I can't figure out how to "pick" the linked portal..
Then I will just set the player position to the other portal..
I thought about using two sprites .. an A. portal and B. portal.. but still have the same problem if I want more than one set of portals. I still need a way to "pick" the linked sprite.
Thanks in advance for any help/suggestions you guys have.