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

#1 2012-01-26 19:39:08

imsosuperswell1
Scratcher
Registered: 2010-12-04
Posts: 1000+

Sonic Game Elements

I'd like some help on a project called Shadow the Hedgehog 2:Burnt Hill its a basic scroller and I wanna add a loop de loop and a homing attack feature but I don't know how to script it.  hmm


http://i43.tinypic.com/34y3brb.png

Offline

 

#2 2012-01-26 20:22:16

JJROCKER
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Sonic Game Elements

I think I need a better picture of what you are saying. Would it be possible for you to upload the project and post a link here so I can help? Thanks  smile


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://img255.imageshack.us/img255/3491/signature1y.jpg&link2=http://img577.imageshack.us/img577/5272/signature1sx.jpg&link3=http://img4.imageshack.us/img4/8514/signature1et.jpg&link4=http://i.imgur.com/POEpQyZ.png&link5=http://img163.imageshack.us/img163/4640/jjrockerfinal.jpg

Offline

 

#3 2012-01-27 12:17:36

scratcher7_13
Scratcher
Registered: 2011-02-09
Posts: 1000+

Re: Sonic Game Elements

I've been trying to do the very same thing. No luck yet.


♫ 90% of teens can't do math. If you are one of the 40% of teens who can, copy and paste this into your signature. ♫♪
http://dl.dropbox.com/u/6273449/BlockLibraryTitle.pnghttp://i.imgur.com/mr9Hf.gif

Offline

 

#4 2012-01-27 13:09:02

Clank23
Scratcher
Registered: 2011-03-01
Posts: 1000+

Re: Sonic Game Elements

I might help later but I have no time at the moment


http://img846.imageshack.us/img846/4333/signaturely.png

Offline

 

#5 2012-01-27 13:22:25

G0D_M0D3
Scratcher
Registered: 2011-11-28
Posts: 1000+

Re: Sonic Game Elements

Loop-de-loop: Make the sprite turn around.

Homing attack: Use the glide block, and a variable named 'homing_selected'


I made a MC texture pack! Get it at planetminecraft!
http://i.imgur.com/0EG0u.png

Offline

 

#6 2012-01-29 12:16:19

imsosuperswell1
Scratcher
Registered: 2010-12-04
Posts: 1000+

Re: Sonic Game Elements

Well Tomicool was able to pull it off, we need him over here.


http://i43.tinypic.com/34y3brb.png

Offline

 

#7 2012-01-30 19:46:24

imsosuperswell1
Scratcher
Registered: 2010-12-04
Posts: 1000+

Re: Sonic Game Elements

Anyone?


http://i43.tinypic.com/34y3brb.png

Offline

 

#8 2012-02-01 19:35:08

imsosuperswell1
Scratcher
Registered: 2010-12-04
Posts: 1000+

Re: Sonic Game Elements

G0D_M0D3 wrote:

Loop-de-loop: Make the sprite turn around.

Homing attack: Use the glide block, and a variable named 'homing_selected'

Thats not a very clear explanation.


http://i43.tinypic.com/34y3brb.png

Offline

 

#9 2012-02-01 21:07:47

maxdoss
Scratcher
Registered: 2010-07-27
Posts: 1000+

Re: Sonic Game Elements

Maybe download tomicools project and use that script.


It's my birthday. Deal with it.

Offline

 

#10 2012-02-05 16:44:23

imsosuperswell1
Scratcher
Registered: 2010-12-04
Posts: 1000+

Re: Sonic Game Elements

His scroller is advanced though I need a basic  neutral


http://i43.tinypic.com/34y3brb.png

Offline

 

#11 2012-02-07 03:33:15

quinnpainter
Scratcher
Registered: 2012-01-21
Posts: 9

Re: Sonic Game Elements

Use this for the homing thing:

when gf clicked
forever
     if <(homing) = [1]>
          glide [1] to (target)
end
end

Offline

 

#12 2012-04-09 23:00:06

sonicawesomegame
Scratcher
Registered: 2012-02-04
Posts: 12

Re: Sonic Game Elements

id love to help. homing attack? no prob! and loopdeloops? that is so my territory!
LET ME HELP!

Offline

 

#13 2012-04-09 23:30:45

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: Sonic Game Elements

ok, for the loop with just horizontal (x) scrolling:

when gf clicked
forever
  if <touching [loop v]?>
    point in direction (90) //In case you weren't already
    repeat until <(scroll x) < ((center x of loop) - (1))>
      change [scroll x v] by (normal rate here)
    end
    repeat (x)
      change [scroll x v] by ((normal rate here) * ([sin v] of (direction)))
      change y by ((normal rate here) * ([cos v] of (direction)))
      turn ccw (y) degrees
    end
    repeat ((250)/(normal rate here))
      change [scroll x v] by (normal rate here)
    end
  end
y can be calculated by taking the inside radius of your loop (r) and  your normal rate (n):

y = 360*n/(2*pi*r)

basically, you're calculating your circumference, finding out how much of that is covered by each move, and converting to degrees from revolutions.

to calculate x:

x = 360/y
   or
x = 2*pi*r/n

This should work...if not, let me know and I'll see if I can come up with an example.

Last edited by AtomicBawm3 (2012-04-09 23:33:53)


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

#14 2012-04-10 12:44:47

SOScratch
Scratcher
Registered: 2010-02-01
Posts: 100+

Re: Sonic Game Elements

You will need to know the basics of creating a scroller.
When done, you need to establish a gravity engine and an engine for the entire game.

Then for loops, you will need to create an inverted x and y axis and a variable to know when you are in a loop.
And for homing, where there is an enemy, you need for it to be able to locate the enemy and dive in on it.


-SOScratch
Scratch On!

Offline

 

#15 2012-04-12 10:04:35

sonicawesomegame
Scratcher
Registered: 2012-02-04
Posts: 12

Re: Sonic Game Elements

here, for a homing attack,this is how you do it
WHEN ? KEY PRESSED
IF ? KEY PRESSED
REPEAT 5 TIMES
CHANGE SCROLL BY 5

Offline

 

Board footer