Discuss Scratch

Overide100
Scratcher
1 post

Help with unique costume script

I've been trying to make a tag type game but i really suck a scratch and coding. How it works is that it creates four clones that are individually controlled (like that one coolmathgame) by different players, and i made 4 unique costumes that when the game starts, randomly move to a different place (just a place holder) and switch to a costume. but i want to make it so that there isnt duplicates and they change into another unique costume. i dont know where to start and i dont know how to use lists. if you need any more info, just ask. thanks
thekingcobra1010
Scratcher
5 posts

Help with unique costume script

With clones, there are easier methods not involving lists that can allow you to control clones separately. I think this wiki article will help you: Advanced Clone Usage
grandpasp
Scratcher
100+ posts

Help with unique costume script

Overide100 wrote:

I've been trying to make a tag type game but i really suck a scratch and coding. How it works is that it creates four clones that are individually controlled (like that one coolmathgame) by different players, and i made 4 unique costumes that when the game starts, randomly move to a different place (just a place holder) and switch to a costume. but i want to make it so that there isnt duplicates and they change into another unique costume. i dont know where to start and i dont know how to use lists. if you need any more info, just ask. thanks

1st, you should experiment with the list functions. Lists are very useful! Just make a list, manually add some items (costume names?), then play with each function to see what they do… Then come back and read the rest…

OK. You're back. LOL

To avoid duplicates, make a list of the options (in this case the four costume names). When choosing, first copy all options into a temporary list. Then, one at a time, choose a random costume (from the temp list), then delete that option from the temp list, then choose the next item from the remaining items in the temp list. (Don't forget that the list is now shorter).

Powered by DjangoBB