how to make a teleport?
idoistuff
Member Posts: 197
I have a ball game where I click the screen and a ball appears (and bounced with gravity)
I was wondering how I would make a teleport so if the ball goes in the left side of the teleport1 it would come out the right side in teleport2
or if it goes in the right side it will come out the left.
also I would like it so if the ball goes through teleport1, bounces back off a wall at teleport2 it would go back through to teleport1. (do you understand? I suck at explaining)
I was wondering how I would make a teleport so if the ball goes in the left side of the teleport1 it would come out the right side in teleport2
or if it goes in the right side it will come out the left.
also I would like it so if the ball goes through teleport1, bounces back off a wall at teleport2 it would go back through to teleport1. (do you understand? I suck at explaining)
Comments
Ace
--when collides with teleport one:
---change attribute self.positionX to game.teleportTwoX
---change attribute self.positionY to game.teleportTwoY
Do he same thing for teleport two, but with opposite attributes.
Have a change attribute in teleport one like this
--change game.teleportOneX to self.positionX
--change game.teleportOneY to self.positionY
Do the same with teleport two, but with teleport two attributes.
Hope I helped!
~CTM
EDIT: haha @Ace, we were posting at the same time!
Ace
Ace
in that video the guy puts the position of the teleport in the player actor.
so that means in each level I would need my teleports in the SAME spot.. which I don't want.
Ace
http://dl.dropbox.com/u/11172522/teleport.png
http://dl.dropbox.com/u/11172522/Click Holes.zip
its just easier if someone looks at it.
having a rule attirube whatever = self position x will do nothing. you need to constrain each attributee to its position