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

#1 2013-01-11 19:21:35

MadnessGames
New Scratcher
Registered: 2013-01-10
Posts: 5

how to make a script like this......

1.how can i make a script where my sprite touches a "spike" and goes all the way at the back of the level/map...
2. and how can i make a portal that we take me to another level

Offline

 

#2 2013-01-11 19:26:16

PhirripSyrrip
Scratcher
Registered: 2012-02-11
Posts: 100+

Re: how to make a script like this......

What I would do is make all spikes a certain colour (here, I'll use grey).

For the player:

when gf clicked
forever
if <touching color [#73736D]?>
go to x: (-100) y: (0)//starting coordinates
As for the portal, script
when gf clicked
set [level v] to [1]
forever
if <touching [portal v]?>
change [level v] by [1]
broadcast [NextLevel v]
And then you would control what you want to change using the "When I receive NextLevel" block. For Example, you might want to change the background for the next level, in which case you would script:
when i receive [NextLevel v]
switch to background (level)

Last edited by PhirripSyrrip (2013-01-11 19:29:50)


http://i46.tinypic.com/ao03lk.png

Offline

 

Board footer