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

#1 2011-01-23 10:22:38

Nano511
Scratcher
Registered: 2011-01-20
Posts: 39

How to make a wall?

Im trying to make an rpg, and i need helping making the walls a barrier, like i dont want him to walk right through them

Offline

 

#2 2011-01-23 10:25:30

slitherax
Scratcher
Registered: 2011-01-09
Posts: 24

Re: How to make a wall?

Just draw a line on your background, and he won't go through.

Offline

 

#3 2011-01-23 10:34:00

Lar-Rew
Scratcher
Registered: 2010-02-19
Posts: 100+

Re: How to make a wall?

I'm afraid that won't work.  You'll need four sensor sprites, one for each direction, that go around the player.  Here is an example one for the bottom (if your player isn't 12 pixels high, change the 6 to the height of the player / 2), with wall color black:

http://i51.tinypic.com/2ue003o.gif

Then, when you tell your player to move down, check whether touchdown? is true, and if it is, don't let them!

Then, do the other directions similarly.

Last edited by Lar-Rew (2011-01-23 10:37:18)

Offline

 

#4 2011-01-23 12:35:09

Nano511
Scratcher
Registered: 2011-01-20
Posts: 39

Re: How to make a wall?

Lar-Rew wrote:

I'm afraid that won't work.  You'll need four sensor sprites, one for each direction, that go around the player.  Here is an example one for the bottom (if your player isn't 12 pixels high, change the 6 to the height of the player / 2), with wall color black:



Then, when you tell your player to move down, check whether touchdown? is true, and if it is, don't let them!

Then, do the other directions similarly.

what are sensor sprites?

Offline

 

#5 2011-01-23 12:47:01

ian528
Scratcher
Registered: 2010-05-25
Posts: 500+

Re: How to make a wall?

It's the sprites that follow the player that are invisible.
They sense what's around the player.

Offline

 

#6 2011-01-23 13:30:47

Nano511
Scratcher
Registered: 2011-01-20
Posts: 39

Re: How to make a wall?

how do i make those

Offline

 

#7 2011-01-23 13:38:51

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: How to make a wall?

Lar-Rew wrote:

I'm afraid that won't work.  You'll need four sensor sprites, one for each direction, that go around the player.  Here is an example one for the bottom (if your player isn't 12 pixels high, change the 6 to the height of the player / 2), with wall color black:

http://i51.tinypic.com/2ue003o.gif

Then, when you tell your player to move down, check whether touchdown? is true, and if it is, don't let them!

Then, do the other directions similarly.

Did you even read the above?

Offline

 

#8 2011-01-23 13:40:02

Nano511
Scratcher
Registered: 2011-01-20
Posts: 39

Re: How to make a wall?

oh and btw, if you wanna see what i have so far its called rpg game .02

Offline

 

#9 2011-01-23 14:20:13

Happypieman
Scratcher
Registered: 2010-09-28
Posts: 100+

Re: How to make a wall?

What you can do is make the walls a certain colour, and then if your guy is touching that colour, make him turn in the opposite direction and move 20 steps away. Easier than sernsors!


2012--The biggest troll ever.

Offline

 

#10 2011-01-23 14:29:35

Nano511
Scratcher
Registered: 2011-01-20
Posts: 39

Re: How to make a wall?

yeah i read that. It doesnt tell me how to make sensor sprites

Offline

 

#11 2011-01-23 15:35:25

Lar-Rew
Scratcher
Registered: 2010-02-19
Posts: 100+

Re: How to make a wall?

Lar-Rew wrote:

I'm afraid that won't work.  You'll need four sensor sprites, one for each direction, that go around the player.  Here is an example one for the bottom (if your player isn't 12 pixels high, change the 6 to the height of the player / 2), with wall color black:

http://i51.tinypic.com/2ue003o.gif

Then, when you tell your player to move down, check whether touchdown? is true, and if it is, don't let them!

Then, do the other directions similarly.

Yes, it does tell you how to make a sensor sprite.  That is the only script for it.

Offline

 

#12 2011-01-23 16:02:09

Nano511
Scratcher
Registered: 2011-01-20
Posts: 39

Re: How to make a wall?

...I know thats the script, but what about the sprite? sensor SPRITE. what does the sprite look like/ how do i make it

Offline

 

#13 2011-01-23 17:16:36

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: How to make a wall?

It can look like anything, as long as it's around the size of the character.



AND IT'S SENSOR SPRITE'S COSTUME
The sprite includes all costumes and scripts, and this forum is mainly for scripts.


@lar-Rew-you have 11 and a half moths?

Offline

 

#14 2011-01-23 17:49:18

Nano511
Scratcher
Registered: 2011-01-20
Posts: 39

Re: How to make a wall?

Can someone link me to a game that has these sensor sprites? because im confused

Offline

 

#15 2011-01-23 20:13:13

Sunrise-Moon
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: How to make a wall?

Actually, no need for a sensor sprite. Are you using velocity?


http://i1067.photobucket.com/albums/u427/HulKDzN/RebornBlade.png

Offline

 

#16 2011-01-23 20:21:43

Nano511
Scratcher
Registered: 2011-01-20
Posts: 39

Re: How to make a wall?

no. Should i? its an rpg.

Offline

 

#17 2011-01-23 20:30:47

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: How to make a wall?

It's going to be harder because you are trying to make 3d-ish rpgs, with tiles/tile movement.
try only bird's eye view, like pokemon or zelda, etc.

Offline

 

#18 2011-01-23 20:33:13

Nano511
Scratcher
Registered: 2011-01-20
Posts: 39

Re: How to make a wall?

kayybee wrote:

It's going to be harder because you are trying to make 3d-ish rpgs, with tiles/tile movement.
try only bird's eye view, like pokemon or zelda, etc.

I know it'll be harder, but i thikn i can pull it off if someone tells me how to make sprite sensors

Offline

 

#19 2011-01-23 20:46:02

Nano511
Scratcher
Registered: 2011-01-20
Posts: 39

Re: How to make a wall?

Btw, i just uploaded a new update, really would like you guys to take a look. The yes please button in not yet fuctional when your talking to the shop owner, but i just want you guys to see what im doing and why i need these walls so badly..

Offline

 

#20 2011-01-23 20:59:45

Nano511
Scratcher
Registered: 2011-01-20
Posts: 39

Re: How to make a wall?

new update, yes please function working now. Please someone tell me what sensor sprites look like, or even better link me to a game that uses them

Offline

 

#21 2011-01-24 20:21:11

Nano511
Scratcher
Registered: 2011-01-20
Posts: 39

Re: How to make a wall?

thanks guys, i figured it out!

Offline

 

#22 2011-01-24 20:56:07

Nano511
Scratcher
Registered: 2011-01-20
Posts: 39

Re: How to make a wall?

oh wait, never mind diddnt figure it out. the code will work on other stuff, just not what i need it to work on. Maybe its because it has costumes?

Offline

 

Board footer