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

#1 2013-02-08 07:30:54

GDrama97
New Scratcher
Registered: 2013-02-02
Posts: 100+

platform game 2

I need some help with creating a platform game. I am finding it hard to complete some of the programming in order to produce a platform game with may interesting level with some challenges.

Offline

 

#2 2013-02-18 09:40:54

estile
Scratcher
Registered: 2013-01-26
Posts: 100+

Re: platform game 2

what parts do you need help with?


http://i45.tinypic.com/s4nvxl.png

Offline

 

#3 2013-02-18 16:20:03

GDrama97
New Scratcher
Registered: 2013-02-02
Posts: 100+

Re: platform game 2

making the character go to the next level and being able top jump onto enemies to kill them

Offline

 

#4 2013-02-18 17:29:43

estile
Scratcher
Registered: 2013-01-26
Posts: 100+

Re: platform game 2

for the enemies, you would add a sensor on top, for example:

when gf clicked
if<color(sensor) is toutchingcolor(sprite)
enemy dies
end


http://i45.tinypic.com/s4nvxl.png

Offline

 

#5 2013-02-18 17:32:51

estile
Scratcher
Registered: 2013-01-26
Posts: 100+

Re: platform game 2

sorry, the block messed up, supposed to say color sensor toutching color sprite.


http://i45.tinypic.com/s4nvxl.png

Offline

 

#6 2013-02-18 17:50:00

GDrama97
New Scratcher
Registered: 2013-02-02
Posts: 100+

Re: platform game 2

how do you make it so when u reach the goal you go to the next level

Offline

 

#7 2013-02-18 18:12:21

GDrama97
New Scratcher
Registered: 2013-02-02
Posts: 100+

Re: platform game 2

I don't have a colour sprite do I have to make one

Offline

 

#8 2013-02-18 19:18:57

estile
Scratcher
Registered: 2013-01-26
Posts: 100+

Re: platform game 2

GDrama97 said "I don't have a colour sprite do I have to make one"
well, you could just say in the sensors scripts, if toutching sprite brodcast die


http://i45.tinypic.com/s4nvxl.png

Offline

 

#9 2013-02-18 19:35:26

GDrama97
New Scratcher
Registered: 2013-02-02
Posts: 100+

Re: platform game 2

how do i make a second level on this game

Offline

 

#10 2013-02-18 20:14:14

estile
Scratcher
Registered: 2013-01-26
Posts: 100+

Re: platform game 2

separate the levels, and create a sprite that sets the scrolling variable to correspond with the start of each level.


http://i45.tinypic.com/s4nvxl.png

Offline

 

#11 2013-02-19 00:58:02

GDrama97
New Scratcher
Registered: 2013-02-02
Posts: 100+

Re: platform game 2

how do i do that

Offline

 

#12 2013-02-19 02:52:28

GDrama97
New Scratcher
Registered: 2013-02-02
Posts: 100+

Re: platform game 2

how do you make it so when u jump on top of the enemies they die

Offline

 

#13 2013-02-19 04:03:31

GDrama97
New Scratcher
Registered: 2013-02-02
Posts: 100+

Re: platform game 2

how do you make it so when u jump on top of the enemies they die

Offline

 

#14 2013-02-19 17:57:29

estile
Scratcher
Registered: 2013-01-26
Posts: 100+

Re: platform game 2

with the level question, you would make the levels part of the same scrolling area, but with sections in between that are blank. the next level/goal sprite changes the scrollx by a certian amount


http://i45.tinypic.com/s4nvxl.png

Offline

 

#15 2013-02-20 16:16:59

GDrama97
New Scratcher
Registered: 2013-02-02
Posts: 100+

Re: platform game 2

how do i make the platforms go diagonally to each other not on top of each other because when i try to put them diagonally they go on top of one another which is not what i am trying to achieve. Also how I add upgrades so you get like a bigger gun or faster shooting more bullets etc.

Offline

 

#16 2013-02-20 19:30:07

estile
Scratcher
Registered: 2013-01-26
Posts: 100+

Re: platform game 2

for this i would need to see the project for advice. do you have it uploaded, just what is there so far?


http://i45.tinypic.com/s4nvxl.png

Offline

 

#17 2013-02-20 20:51:04

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: platform game 2

GDrama97 wrote:

how do you make it so when u jump on top of the enemies they die

Okay, I will try to explain. But I need to know if you want a scroller or if you want the player to warp to the next level.

To be able to jump on enemies and crush them:

Put this in a sensor sprite(maybe a black line, simple):

When gf clicked
go to x: <[x position v] of [player]> y:<  <[y position] of [player]> - (50)> // the number 50 is just a guess, you will have to experiment but just make sure it's under the player.

Also put this in it:
When gf clicked
Set [ghost v] effect to (100)
show
Forever
If <touching? [enemy v]>
broadcast [squashed! v]
Stop script
End
End
Then, on your enemy:

When I receive [squashed! v]
switch to costume [squashed v]
set [dangerous? v] to [no] // this would be a variable that would tell the player if the enemy still can hurt because the player will crush the enemy and then touch it, so...

When you make that "dangerous?" Variable, check the "for this sprite only" check.

Put this in your player:

When gf clicked
Forever
If < < [dangerous v] of [enemy v] > = [yes] >
If <touching? [enemy v] >
Broadcast [lost a life! v]
End 
End
There are other ways to do that, but this should do the trick.

NOTE: This strategy would probably also require a sensor in front of the player, to make sure the player crashes instead of squashing the enemy.

Regards,

CAA14

Last edited by CAA14 (2013-02-23 22:37:31)

Offline

 

#18 2013-02-21 07:29:28

GDrama97
New Scratcher
Registered: 2013-02-02
Posts: 100+

Re: platform game 2

is enemy a variable script

Offline

 

#19 2013-02-21 11:46:23

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: platform game 2

GDrama97 wrote:

is enemy a variable script

No, enemy is a sprite.

Regards,

CAA14

Offline

 

#20 2013-02-21 16:01:50

GDrama97
New Scratcher
Registered: 2013-02-02
Posts: 100+

Re: platform game 2

how do you make the enemy script red like the one you showed mem

Offline

 

#21 2013-02-21 17:09:02

estile
Scratcher
Registered: 2013-01-26
Posts: 100+

Re: platform game 2

GDrama97 wrote:

how do you make the enemy script red like the one you showed mem

the color of the script shouldn't affect the result, but if you really want it red, shift click the r in the scratch icon, click turn fill screen off, move the block into the white space, alt click it, find "menu for me", click it, click change color, and set the color to red. it wont affect anything but the block color though.


http://i45.tinypic.com/s4nvxl.png

Offline

 

#22 2013-02-21 20:55:38

GDrama97
New Scratcher
Registered: 2013-02-02
Posts: 100+

Re: platform game 2

is the enemy script a variable

Offline

 

#23 2013-02-21 21:06:16

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: platform game 2

GDrama97 wrote:

is the enemy script a variable

No.... It's a sprite. The enemy itself is the sprite,

Regards,

CAA14

Offline

 

#24 2013-02-21 21:16:57

GDrama97
New Scratcher
Registered: 2013-02-02
Posts: 100+

Re: platform game 2

how do i start the game at level 1 i have two levels and i cant seem to be bale to start it at level 1

Offline

 

#25 2013-02-21 21:39:54

GDrama97
New Scratcher
Registered: 2013-02-02
Posts: 100+

Re: platform game 2

how do you make it so when u reach the goal the game transitions to the next level

Offline

 

Board footer