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

#1 2012-02-17 20:45:57

BlackEdge
Scratcher
Registered: 2009-01-20
Posts: 19

Non-Vibrating Collisions

I want to know of a way to make a sprite collide with an object (I.e. If it moves into it, it will sttop) I know this is possible because I have done it before but that scratch file is long gone. So yeah, a collision script which doesn't vibrate in and out of the object.
Sorry friends briefness, Im on my phone.

Last edited by BlackEdge (2012-02-17 20:47:16)


http://i304.photobucket.com/albums/nn166/craze_left/Autumn-1.gif

Offline

 

#2 2012-02-17 21:52:47

laptop97
Scratcher
Registered: 2011-06-27
Posts: 1000+

Re: Non-Vibrating Collisions

(link to project) This is my version how to do that. This basically uses a ghost to sense if there is a wall or edge to get rid of the glitchy vibrations. It sends out a broadcast for the visable player to move if the space is clear.  smile

Offline

 

#3 2012-02-17 21:55:31

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Non-Vibrating Collisions

when gf clicked
go to x:(0) y:(0)
forever
    if <touching [object v]?>
        stop script
    end
    point towards [mouse-pointer v]
    move (10) steps
Or do you mean colliding into walls?

Offline

 

#4 2012-02-18 07:34:13

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

Re: Non-Vibrating Collisions

Yeah, try Magnie's link.

Also, where did you get your sig? It's really cool!


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

Offline

 

Board footer