Be a Supporter!

Platformer Spawning help

  • 309 Views
  • 4 Replies
New Topic Respond to this Topic
CompleteDouche
CompleteDouche
  • Member since: Dec. 1, 2008
  • Offline.
Forum Stats
Member
Level 09
Musician
Platformer Spawning help 2009-03-25 20:49:24 Reply

When a player goes to the end of the screen, he goes to a next frame,(touches movieclip that send the timeline 2 the next frame) Well in the next frame the dude is somewhere else in the screen,(lets say i want him in the left side(this is a right to left platformer)) but when i test the game, the player is in the same spot where it was in the last frame, u dig.
How can i change the players spawning in the next frame?


No matter what your weaknesses are, make sure your own abilities supersede them.

Irrelephant
Irrelephant
  • Member since: May. 4, 2008
  • Offline.
Forum Stats
Member
Level 34
Blank Slate
Response to Platformer Spawning help 2009-03-25 20:53:25 Reply

Put in the next frame...

_root.MC NAME._x=30
_root.MC NAME._y=30

Adjust the numbers til it works.


Formerly known as Headshot777
The Newgrounds BBS is like a woman. All the teenagers who get into it make a terrible mess within two minutes. -Jercurpac

BBS Signature
Denvish
Denvish
  • Member since: Apr. 25, 2003
  • Offline.
Forum Stats
Member
Level 46
Blank Slate
Response to Platformer Spawning help 2009-03-25 20:58:08 Reply

Assuming the Instance Name of the player is 'player', you just need to add some actions to frame 2 of the game, eg:

player._x=300;
player._y=200;

- - Flash - Music - Images - -

BBS Signature
CompleteDouche
CompleteDouche
  • Member since: Dec. 1, 2008
  • Offline.
Forum Stats
Member
Level 09
Musician
Response to Platformer Spawning help 2009-03-25 20:58:21 Reply

So in the next frame i position the character with x and y coordinates Within the movieclip, or within the total timeline actions?

i think the latter but...

No matter what your weaknesses are, make sure your own abilities supersede them.

Denvish
Denvish
  • Member since: Apr. 25, 2003
  • Offline.
Forum Stats
Member
Level 46
Blank Slate
Response to Platformer Spawning help 2009-03-25 21:00:10 Reply

At 3/25/09 08:58 PM, CompleteDouche wrote: So in the next frame i position the character with x and y coordinates Within the movieclip, or within the total timeline actions?
i think the latter but...

Try both and see what happens :)
But yeah, it's the latter


- - Flash - Music - Images - -

BBS Signature