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

#1 2009-09-07 02:01:29

LWSrocks
Scratcher
Registered: 2009-01-31
Posts: 8

I need some help from an experienced Scratcher!

I'm working on something that I plan to be a HUGE game with a lot of levels, starring Sonic the Hedgehog. It's called Sonic Grav, and its sort of a puzzle spinoff where you have to keep Sonic from hitting spikes or hazards. But, I'm REALLY bad at scratching, so I want to know how to do a few things.

1. How do I make a sprite solid? (Keep the control sprite from going through it)
2. How do I make something cause the sprite to die? (Such as spikes or enemies that kill the control sprite thus making him lose a life and go back to the start of the level)
3. How do I create a goal that takes the character to the start of the next level?
4. How do I create a 1up? (Object that adds life to a character when obtained)
5. Some more... related things.

Offline

 

#2 2009-09-07 04:30:43

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: I need some help from an experienced Scratcher!

Here you go.


1. This depends greatly on what you're doing. If there's a solid wall that's straight up and down, set the control sprite so if its X or Y position is at the wall, make the X or Y position move. Or if the walls are unpredictable (in other words, if they are in weird positions and things), try making the sprite switch direction by 180 and moving some steps. With the [point in direction [((direction) + 180)]] blocks and the [move [ ] steps] block, of course. You could change the + to a - if you want to; it won't make any difference.

2A. If the spikes are a certain color that nothing else is, you could use the <touching color [ ]> block for when the control sprite dies. If there are other things that are the same color as the spikes, you could make the spikes sprites and use the <touching [Sprite 1]> block instead. Of course, if it's only things that kill you that are a certain color, then it doesn't matter about if there's something else that's the same color. They all kill you; use the <touching color [ ]>.

2B. For the control sprite to go back to the beginning of the level, there are two things:
   1. If it's a scroller, just set the Scroll X (or Scroll Y if you're using it) to the right spot.
   2. If it's a 'go through background' level, just set the background and the X and Y for the sprite.

3. If the goal is a certain sprite, use the <touching [Sprite 1]> block to broadcast the next level. If the goal is something in a sprite or background, try using the <touching color [ ]> block. Of course, this won't work if there's something else the same color. If this happens, try using a sprite as the goal; it'll make it much easier. See the beginning of this section.

4. Make a sprite that'll act as the 1-up, and use the <touching [Sprite 1]> block for detecting if the control sprite is touching the 1-up. When it touches, hide the 1-up and broadcast a life change (like changing the health variable or custom display by 1).

5. Tell me about them.


Hope this helps!

Last edited by Jonathanpb (2009-09-07 04:31:49)


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#3 2009-09-07 10:28:21

TheSaint
Scratcher
Registered: 2008-11-04
Posts: 1000+

Re: I need some help from an experienced Scratcher!

Yeah, I can't beat that explanation. Try looking at some similar projects for references as well.

Offline

 

#4 2009-09-07 16:10:27

Mike16112
Scratcher
Registered: 2007-06-09
Posts: 100+

Re: I need some help from an experienced Scratcher!

For the 1up here is a script

<when green flag clicked>
<forever if><touching[ 1up
<change{ lives }by( 1
<wait until><<  <not> <touching[1up  >>
<broadcast[ hide 1up
<end>

Keyboard not found, press any key to continue.

http://img802.mytextgraphics.com/flamewordmaker/2009/09/07/987b6297cfa7e48782e620ed11185fb1.gif
http://img80.imageshack.us/img80/198/mybanner4aa508f1f12ac.png


The programmer has a nap. HOLD OUT! PROGRAMMER!

Offline

 

#5 2009-09-07 22:33:58

LWSrocks
Scratcher
Registered: 2009-01-31
Posts: 8

Re: I need some help from an experienced Scratcher!

Well, how do I make life count?

Offline

 

#6 2009-09-07 22:35:03

weswesrock
Scratcher
Registered: 2009-06-25
Posts: 500+

Re: I need some help from an experienced Scratcher!

LWSrocks wrote:

Well, how do I make life count?

Display the variable "life"

Offline

 

#7 2009-09-07 22:41:26

LWSrocks
Scratcher
Registered: 2009-01-31
Posts: 8

Re: I need some help from an experienced Scratcher!

Ok, nvm, I figured that out- but I dont understand the part of making solid ground

Offline

 

#8 2009-09-07 23:46:32

Larry828
Scratcher
Registered: 2007-05-30
Posts: 100+

Re: I need some help from an experienced Scratcher!

You want help from an experienced Scratcher, and although I've been Scratching for a couple of years I'm still in the early stages.  But there is one thing that I would suggest from reading your post and the replies: take things one at a time.  Trying to build a whole game with all the things you want is quite a job....as you say.  My humble advice would be, for now, to build a project where something hits a wall and bounces off.  That's it. Then maybe add the fact that if it *hits* the wall it scores a point.  And then, if it scores 5 points it moves up a level (using the tips that people have given you).  For keeping track of the score you would probably use a variable "Score".....and that's a whole subject in itself: variables.  You could make some fun projects where bouncing off of blue walls adds a point, but bouncing off of gray walls loses a point.  ------- In short, you'll probably feel less frustrated if you break big projects down into manageable pieces.  That's my humble opinion....  smile

Offline

 

#9 2009-09-08 01:41:08

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: I need some help from an experienced Scratcher!

weswesrock wrote:

LWSrocks wrote:

Well, how do I make life count?

Display the variable "life"

What I (and Chrischb) do is make a sprite that's the life counter. Sometimes you don't even need a life variable! You just do things like 'if <(costume of [Life Counter]) = [0]>', you die. For 1-ups, either use the block [next costume] or the blocks [switch to costume ([costume] - [1])].

The same method applies to score. Check m44's projects; they're full of them.


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#10 2009-09-19 10:45:18

PyrosTheStickman
Scratcher
Registered: 2009-09-19
Posts: 53

Re: I need some help from an experienced Scratcher!

How do you make stuff appear in the loading screen!!!!!!!!!!!!!!!!!!!!!!1<mouse x><mouse y><mouse down?>

Offline

 

#11 2009-09-19 11:01:54

fireball123
Scratcher
Registered: 2008-05-08
Posts: 1000+

Re: I need some help from an experienced Scratcher!

if your really bad at scratching, why are you making a huge game?


I did it for the Lolz

Offline

 

Board footer