How to correctly iterate through objects' costumes list?

Hello everybody! Immediately felt in love with Snap! once I got to know it, and wanted to thank you, devs and forum users, for all of your work and participation. It inspires!

I have a question regarding objects' attributes. Maybe it's quite obvious as it is and/or well-explained in a certain Reference chapter I skipped, but there's the one thing I wanted to implement in my tiny deckbuilding game I'm currently working on.

On the stage, there are a "Card_Face" object which contains images for base (anchor point) object "Card". The point is, I want to iterate through the named costumes list (each costume has it own unique predefined name) of the "Card_Face", get the name of the each sprite, then process it through several if/else or switch (using library) branches in order to define the type of the card (enemy, item, event) and pass it to the pseudo C-like enumeration "Card_Enum_Types".

Can you please tell me where I'm doing a mistake? I'll try to upload some screenshots in comments since image embedding is not working.

Attaching image doesn't work in the comments either, and link posting is not allowed too! Wow...

There limits on what new users can do but in the meantime try sharing your project and we might be able to find it

Will do, thank!

You may be able to send the link if you put it between backticks like this

`https://example.com/`

https://example.com/

(the forum counts links based on if they're clickable or not)

Man, that's better, thank you!

Uh-oh, link check here is kinda smart, is it okay to chop down the link in separate words? =)

Okay, sorry for bloating up the post, here's the project: deckbuilding?

For starters ,I think you should be using
deckbuilding_ script pic

Also, all your stop this block blocks are completely redundant - all scripts stop when they end :slight_smile:

Oh, I knew it have to be that simple! Big thanks! As for stop blocks, it's just for me to have a visual sign of the end of the code block

Sir, final question if you don't mind. Could you please suggest some kind of improvement for this part of game logic? Is there are more elegant way to assign types of cards?

I've no idea of what you are trying to accomplish and I'm not into programming games - sorry

My bad, pardon. Wasn't wise of me to say without thinking first.

No problem. Thanks again for the hint.

This post was flagged by a user who doesn't think we are banning that particular word (damn). I don't think the flagger really intended us to remove the post, but rather to encourage me to respond to it, which I am now doing.

When I wrote the quoted policy, we had a bunch of really young users on the forum, some of whom objected strongly to even the mildest of swears, and since swearing is rarely actually necessary, I was willing to accommodate them. My personal opinion is that people shouldn't be afraid of words, not even That Word, and it bothers me a lot that people are no longer encouraged to read Huckleberry Finn, the Great American Novel, in which racist characters are depicted using the language of racists.

In the current case, the OP responded to @sathvikrias by removing the word in question from their post, I guess agreeing that it wasn't necessary to what they were trying to say. So this specific case is moot. But I would not be inclined to censor the post in its initial form, which I consider a vanishingly mild case of swearing.

Aside from mildness, in this particular example, the poster was using the word in question to express frustration with themself, not to attack someone else, and I'm especially inclined to allow that. Name-calling against another user is a kind of bullying, and I would happily censor that, even if the word in question isn't on anyone's list of banned words. Take for example the word "evil"; if you publish a game project in which the player is fighting the forces of evil, I think that's fine, but if you call another Snap! user evil, you'd have to be responding to something that really is evil before it'd be appropriate--torturing animals IRL, say, but not torturing animals in a game.

I'm sorry I'm not laying down a simple rule that would be easy to follow, but sometimes people use strong language in response to something that really provokes it, and I've been known to use such language myself in such situations.

P.S. This is just me talking; I've tried and failed to get my colleagues in this enterprise to spend some time working on forum policy issues. :~( They'd rather spend time on actually improving Snap!, as would I!

Hey, thanks for the reasonable words. I think I had to state out several things before actually asking questions and joining the conversation, not to use them in any way for "self-defense", but to clear things out and to make a normal apology. One thing is that I'm not a native speaker, so forgive me please for being a 'caveman', rude/impolite or speaking out of context in general, and second is that I've got a wrong image of current forum public from recent posts. I totally forgot that children can be around there or just the culture of communication can differ from forum to forum. Silly barbarian, where are my manners!

I don't personally think damn or hell should be banned imo