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

#1 2007-06-12 13:00:06

Yibi
Scratcher
Registered: 2007-06-12
Posts: 3

Help me please. :)

Hey, I was wondering if it was possible to insert a hyperlink to a webpage in a scratch program.

Also, I'd like to make a tiled floor for a sprite to walk on. When the user clicks a tile the sprite will go to that tile. Do these tiles need to also be sprites or could i make sort-of hotspots?

Please get back to me!

Offline

 

#2 2007-06-12 13:18:38

Drproduction
Scratcher
Registered: 2007-06-11
Posts: 1

Re: Help me please. :)

Firtly, you cant link to webpages on scratch.

Lastly you would have to make all the tiles seperatly or all different colours

Offline

 

#3 2007-06-12 15:55:06

Duncan
Scratcher
Registered: 2007-05-15
Posts: 47

Re: Help me please. :)

You could use a background image rather than individual sprites and note the x and y positions - the hot spots.

Try as an example:

Forever
If MouseDown
  Go To MousePointer

But it will depend what you want to do when you get to the tile.

Offline

 

#4 2007-06-12 17:41:03

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Help me please. :)

For a regular array like tiles, I'd recommend computing based on the mouse pointer, rather than separate sprites.  See for example my architecture stamps or mastermind game:
http://scratch.mit.edu/projects/kevin_karplus/12280
http://scratch.mit.edu/projects/kevin_karplus/12236

Offline

 

#5 2007-06-13 12:30:25

Faithlessisme
Scratcher
Registered: 2007-06-12
Posts: 1

Re: Help me please. :)

Hey How Do You Make Really Cool Projects?

Offline

 

#6 2007-06-13 12:42:57

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Help me please. :)

really cool projects require 3 things
   1) really cool ideas
   2) some programming skill
   3) diligence in applying ones skills to produce the project

Both (2) and (3) improve with practice and (sometimes) with instruction, but I don't know good ways to come up with really cool ideas---some of it is creativity and some of it is luck.

Offline

 

#7 2007-06-13 16:40:45

weissjd
Scratcher
Registered: 2007-05-16
Posts: 64

Re: Help me please. :)

Or you could write a really cool idea generator. Click the green flag to generate a new great idea. You could add some variables with sliders to allow the user to set some parameters controlling what kind of great ideas to generate.

I currently have a team working on a program like this in Scratch and will release more information on June 31st!

Offline

 

#8 2007-06-15 08:42:47

Yibi
Scratcher
Registered: 2007-06-12
Posts: 3

Re: Help me please. :)

Thanks guys! Now i'm wondering how to make the sprite face left when i click somewhere left and right when i click somewhere right.

Please get back  smile

Offline

 

#9 2007-06-15 11:53:13

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Help me please. :)

forever if mouse down
   if xposition < mouse x
     point in direction 90
   else
     point in direction -90
   wait until not mouse down

Offline

 

#10 2007-06-16 16:24:29

Yibi
Scratcher
Registered: 2007-06-12
Posts: 3

Re: Help me please. :)

Woohoo thanks Kevin!

Does anyone know how i could make the sprite throw a snowball (when the player clicks on the target) and then  when the target is hit the snowball disappears?

Also - i know how to make a score counter, but i was wondering if it was possible to make the target dissapear after so many points, and a new target sprite appears.

Sorry i'm new at this!  smile  Please get back.

Offline

 

#11 2007-06-16 18:47:06

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Help me please. :)

The code for basic shooting is:

{make bullet move}
when flag clicked
forever
if shotfired = 0
go to player
else
repeat until touching edge or touching evil snowmen ect...
move 10 (or whatever the shot speed is) steps

{control the shofired variable}
when clicked
forever
if mouse down and touching player
set shot fired to 1
else
set shot fired to 0

{Point to mouse pointer}
when flag clicked
forever
if shotfired = 1
point towards mouse pointer

{if you dont want the shots to be seen when not fired}
when flag clicked
forever
if shotfired = 1
set ghost effect to 0
else
set ghost effect to 100

Hope this helps  smile

Last edited by archmage (2007-06-16 18:52:30)


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#12 2007-06-17 01:27:54

gtest
Scratcher
Registered: 2007-06-17
Posts: 2

Re: Help me please. :)

good stuff guuys,.,.. i might want to do something soon

Offline

 

Board footer