Discuss Scratch

fireincarnate
Scratcher
100+ posts

categorizing costumes?

I'm making a scrolling platformer and when the player reaches the right side of the screen, next level. (this works because of a mechanism I made to stop scrolling when that part of the level comes on screen.)
whenclickedforeverifscrollx>4320thensetscroll xto4320
but the thing is, the ground sprite needs to know what the costumes of level 1 are so it doesn't do any others. I could just use lists, but I don't want to have to do the whole
addsomethingtolistaddsomething elsetolistetc.
thing.
so I was wondering how I could do that. help, please?
2millerjd
Scratcher
3 posts

categorizing costumes?

You could try having all the costumes for level 1 start with level 1. This way, if you want to call on the, you could do
switchcostumeto(join [level 1, costume number)v]
Just make sure to put the join exactly how you spell it in the costume. I put a space, so I could name the costume with a space(level 1, 23).
fireincarnate
Scratcher
100+ posts

categorizing costumes?

thanks! I'll try it, but in case it doesn't work, I will leave this topic open.
fireincarnate
Scratcher
100+ posts

categorizing costumes?

now that project has a very bad bug, but I'm not sure if it was caused by that.
fireincarnate
Scratcher
100+ posts

categorizing costumes?

2millerjd wrote:

switchcostumeto(join [level 1, costume number)v]
by the way, it's
switch costume to (join (level 1,) (costume number)). observe:
switchcostumetojoinlevel 1,costume number
fireincarnate
Scratcher
100+ posts

categorizing costumes?

fireincarnate wrote:

now that project has a very bad bug, but I'm not sure if it was caused by that.
it seems to be caused by that, because when I undid that suggestion, the bug went away.

Powered by DjangoBB