Discuss Scratch

SnakeVenomous
Scratcher
7 posts

Sprites and Solid Furniture

I made a sprite that you can move around in his room. I put all the furniture and put it in one image and used something similar to this script to make the furniture solid/not make the sprite go through it.

whenclickedforeveriftouchingcolor?thenmove-4steps

Here's the image of the room I put together: http://imgur.com/hBs5Djb (used opengameart.org )

But when I tested this, I found that the sprite could move backwards through the furniture so that didin't work.
After some testing with scripts I decided to make the furniture different sprites. I took the floor out and made that the background and for testing purposes, I inserted a red rectangle. I first used this project's method: http://scratch.mit.edu/projects/188807/ but it made the sprite stuck inside the square and I couldn't get him out by using WASD. Then I used the method that's in my project right now and that made the sprite rotate and move forwards and backwards constantly.

Can anyone find a way to make a sprite/furniture solid?

Link to my project: http://scratch.mit.edu/projects/15574026/
My browser / operating system: Ubuntu Linux, Firefox 30.0, Flash 11.2 (release 202)
110Percent
Scratcher
100+ posts

Sprites and Solid Furniture

Instead of using this script:
turn180degreesmove4steps
Use THIS script:
move-4steps
If you had used x and y velocity scripts, I could've given you a better script, but this is all I can offer.
SnakeVenomous
Scratcher
7 posts

Sprites and Solid Furniture

Well, I already used that script and it did not work well for the RPG. It might work well in a platformer but I can make my character move through the furniture by turning him around. I messed around with some velocity scripts but I couldn't get it to work perfectly and also velocity is ned really good in an rpg. Is there anything else I can do?
ryandw
Scratcher
62 posts

Sprites and Solid Furniture

you could do this:
whenclickedforeveriftouchingrug?thenchangexby-4
This is one way. I tested it and it work.
Theprodigy
Scratcher
100+ posts

Sprites and Solid Furniture

I made this: http://scratch.mit.edu/projects/24583586/, it has the collision system, all you would need to do is change the shape of the wall for every new area to match the objects that you want to collide with.
orangegirl88
Scratcher
11 posts

Sprites and Solid Furniture

This sound really silly, but can someone tell me how to post a question in discussions? I'd appreciate it!
Theprodigy
Scratcher
100+ posts

Sprites and Solid Furniture

Click the new topic button, under ‘help with scripts’, or any other section of the forum that you want the question to be in.
Theprodigy
Scratcher
100+ posts

Sprites and Solid Furniture

Did you get it figured out?
SnakeVenomous
Scratcher
7 posts

Sprites and Solid Furniture

Very sorry for the late response but I'm sure to implement this into my project. Thank you! Also, if you go into another room, is there a way to hide/remove them if not in the area?
Theprodigy
Scratcher
100+ posts

Sprites and Solid Furniture

Yes, add different costumes. Next, in each costume change the shape of the “wall” sprite to fit whatever objects you have in the new area.

Last edited by Theprodigy (July 21, 2014 15:12:40)

batty-for-band-aid
Scratcher
1 post

Sprites and Solid Furniture

Does anyone have a table sprite?

Powered by DjangoBB