Making doors/portals?
In my basic platformer game, I'm trying to make the actor with the following properties:
-Initially, it's just a static door
-When the screen is tapped anywhere, it opens and functions as a warp to another door
-The warp is similar to this:
- Then when the screen is tapped anywhere, it should ho back to being a static door
I'm having trouble with this, can anybody advise/help?
Best Answer
-
Malkovich Posts: 116
Hi @RenovateGames, first make a game boolean attribute, call it OPEN, leave it unchecked. Second, make an invisible actor same size of the screen, make a rule on it, when touch is press ==> change attribute OPEN to not(game.OPEN)
Third, make your warps actors.
Fourth, in you player actor make rules, When overlap or collides with Warp AND game attribute OPEN is true ==> change attrib self position X, Y to...wherever you want. Make other rule, When overlaps or collides with Warp AND game attribute OPEN is false==> collide with warp.I hope this makes sense to you. Good luck (srry for my english)
Greetings
Answers
OK i make a template for you. A project example is worth a thousand words.
Nix the Cat: Jump Adventure * Twitter * Facebook
Thanks so much Malkovich!