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

#1 2012-05-01 12:02:21

wildbilla
Scratcher
Registered: 2012-02-17
Posts: 20

grouping togeather sprites

hey all i have two questions 1 i was wondering if you could help me how would i be able to link my sprites together i have three cars  i want to join them together so they move as one



2 And i want to join my enemy sprite onto the cars so that when they move he follows  and stays on the cars and dosnt move how would i do that  any help would be greatly appreciated thank you.

Offline

 

#2 2012-05-01 17:39:47

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

Re: grouping togeather sprites

1. You could just use the same script for each car
2. Use a script like this for the enemies:

forever
go to x: ([x position v] of [car v]) y: ([y position v] of [car v])
end


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

Offline

 

#3 2012-05-01 20:08:55

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: grouping togeather sprites

PhirripSyrrip wrote:

1. You could just use the same script for each car
2. Use a script like this for the enemies:

forever
go to x: ([x position v] of [car v]) y: ([y position v] of [car v])
end

For the enemies, you would prefer something like

when gf clicked
forever
 point towards [car v]
 move [3] steps
end

Last edited by jji7skyline (2012-05-01 20:09:06)


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#4 2012-05-01 20:18:23

wildbilla
Scratcher
Registered: 2012-02-17
Posts: 20

Re: grouping togeather sprites

cool thanks for the help guys much appreciated wat code would i use to link the cars together so they move as one whole sprite  smile

Offline

 

#5 2012-05-15 11:41:09

wildbilla
Scratcher
Registered: 2012-02-17
Posts: 20

Re: grouping togeather sprites

Hi guys im having problems with some coding could you help

I have a boss sprite im trying to say when the boss is defeated the item you need to pass the level appears what script would i need to make that happen

thank you:)

Offline

 

#6 2012-05-17 07:19:56

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

Re: grouping togeather sprites

wildbilla wrote:

Hi guys im having problems with some coding could you help

I have a boss sprite im trying to say when the boss is defeated the item you need to pass the level appears what script would i need to make that happen

thank you:)

Create a variable so that when the boss is defeated, it will set "bossIsDefeated?" to "true":

when gf clicked
forever
if <(bossIsDefeated?) = [true]>
broadcast [show item you need v] and wait
end
Your script for next level here
For the item you need to show, use this script:
when I receive [show item you need v]
show
Hope it helps. I know there are more efficient scripts but I'll keep it simple. Not good for a 1s1s game though.  big_smile


FOR ALL THE NEWS ON UPDATES FOR SIMPLISTICRAFT, CLICK HERE.

Offline

 

#7 2012-05-26 18:32:42

wildbilla
Scratcher
Registered: 2012-02-17
Posts: 20

Re: grouping togeather sprites

Hi guys im having a problem with some code in scratch wonder if yous could help me

what script would i use to make an enemy sprite move up and down and bounce off the top and bottom of the stage. tank you

Offline

 

Board footer