00:00
00:00
View Profile 1Kingfire1

Male

Joined on 12/16/07

Level:
7
Exp Points:
410 / 550
Exp Rank:
> 100,000
Vote Power:
4.84 votes
Rank:
Town Watch
Global Rank:
62,720
Blams:
37
Saves:
82
B/P Bonus:
2%
Whistle:
Normal
Medals:
19

Rpg Game In Process Need Help

Posted by 1Kingfire1 - April 11th, 2009


Can Someone help. I got a main frame in which the character walks around the town. I use scrolling instead of the character moving. When I go into say a shop. It goes in you do your business and walks out again. When you walk out it doesn't spawn you outside of the shop door but where you start in the first place. How do I get it to spawn the player at a certain co-ordinate?


Comments

Store the background's x position on _root.
So,
<code>
if(Key.isKeyDown(RIGHT))
{
_root.bg._x -= this.speed;
_root.worldx = _root.bg._x;
}</code>

When you come outside...
<code>_root.bg._x = _root.worldx;</code>

It's pseudo, take it with a grain of salt.