00:00
00:00
Newgrounds Background Image Theme

NeonWolfNate just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Reset button in dressup game?

950 Views | 3 Replies
New Topic Respond to this Topic

Reset button in dressup game? 2020-09-01 07:10:26


Hi!

Im making a very small dressup game and ive decided to keep all the clothes (in categories) on display near the character, once they get moved around it gets real messy!

Its my first time ever coding in anything, got no clue what im doin ...

Im using Flash CS6 Action script 3 and my scene is structured in:


frame 1 preloader

frame 2 movie clip with the game itself


help plz


hi :)

BBS Signature

Response to Reset button in dressup game? 2020-09-07 10:11:44


if you have all of the clothes inside a movie clip, i think the simplest way to reset all positions is to get out of the movie clip frame and back again, because this resets the movieclip. So let's say you have the clothes movie clip on frame 2, you can add a reset button also on frame 2 that has a code like


gotoAndStop(3);

gotoAndStop(2);


this way it will theoretically go to frame 3 and back to frame 2, but since they're kinda happening at the same time you won't even see it going to frame 3, and in practice it will just reset the movie clip, therefore the clothes should be on their default positions.


At 9/7/20 10:11 AM, Edeshye wrote: if you have all of the clothes inside a movie clip, i think the simplest way to reset all positions is to get out of the movie clip frame and back again, because this resets the movieclip. So let's say you have the clothes movie clip on frame 2, you can add a reset button also on frame 2 that has a code like

gotoAndStop(3);
gotoAndStop(2);

this way it will theoretically go to frame 3 and back to frame 2, but since they're kinda happening at the same time you won't even see it going to frame 3, and in practice it will just reset the movie clip, therefore the clothes should be on their default positions.


Eventually made it with taking all the coordinates of the clothing to snap back to their first position, but ill try your method next time! I think i did try it at one point but was bugging the preloader so weird!

Heres the game btw



hi :)

BBS Signature

Response to Reset button in dressup game? 2020-09-07 10:27:50


At 9/7/20 10:16 AM, MKMaffo wrote:
At 9/7/20 10:11 AM, Edeshye wrote: if you have all of the clothes inside a movie clip, i think the simplest way to reset all positions is to get out of the movie clip frame and back again, because this resets the movieclip. So let's say you have the clothes movie clip on frame 2, you can add a reset button also on frame 2 that has a code like

gotoAndStop(3);
gotoAndStop(2);

this way it will theoretically go to frame 3 and back to frame 2, but since they're kinda happening at the same time you won't even see it going to frame 3, and in practice it will just reset the movie clip, therefore the clothes should be on their default positions.
Eventually made it with taking all the coordinates of the clothing to snap back to their first position, but ill try your method next time! I think i did try it at one point but was bugging the preloader so weird!
Heres the game btw
https://www.newgrounds.com/portal/view/764714


nice work, a classic flash, heh. congratulations on the success