This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2009-11-12 22:35:37

steppenwulf
Scratcher
Registered: 2009-07-23
Posts: 1000+

How do you make your list un-add then re-add when you restart the game

In the game I'm making, I added all of the enemies to a list called "enemies". Everytime I restart the game (press the green flag), however, the list keeps all of the enemies added, and re-adds all of the enemies over again  hmm  how do you make the list un-add and then re-add the enemies to the list when u press the green flag? TIA

Btw the Demo will be uploaded this Friday (tommorow) or Saturday.  big_smile

Last edited by steppenwulf (2009-11-12 22:37:44)


I'm graduating HS this April and going to college in the Fall.

Offline

 

#2 2009-11-12 22:38:22

adriangl
Scratcher
Registered: 2007-07-02
Posts: 1000+

Re: How do you make your list un-add then re-add when you restart the game

Code:

When Green Flag Clicked
delete (all) of (enemies)
add (whatever) to (enemies)

This is how I do it and it works. Make it delete first and then add.


Scratchin' since 2007

Offline

 

#3 2009-11-13 08:05:39

steppenwulf
Scratcher
Registered: 2009-07-23
Posts: 1000+

Re: How do you make your list un-add then re-add when you restart the game

Thank yooooouuuuu adriangl.  big_smile


I'm graduating HS this April and going to college in the Fall.

Offline

 

Board footer