Discuss Scratch

Blaze349
Scratcher
1000+ posts

SPRITE GROUPS!!!!!!!

we should add a way of making sprite groups (like creating a sprite folder/ group naming it and placing sprites inside) so a block like
point towards nearest sprite group[enemies v]
this would help recreate games like sonic I don't think you can do scripting for homing attacks yet
imagine this script
when green flag clicked
forever

if <<<<<<<<<<touching [enemy v]?> or <touching [enemy2 v]?>> or <touching [enemy3 v]?>> or <touching [enemy4 v]?>> or <touching [enemy5 v]?>> or <touching [enemy6 v]?>> or <touching [enemy7 v]?>> or <touching [enemy8 v]?>> or <touching [enemy9 v]?>> or <touching [enemy10 v]?>> then

hide
broadcast [gameover v]
end
end

but with sprite groups you could do this

when green flag clicked
forever

if <touching sprite from sprite group [ enemies v]?::sensing> then

hide
broadcast [game over v]
end
end
this would make things easier to organise sprites like if you had 50 sprites(it happens).


another suggestion

point towards [nearest sprite v]

SUPPORTERS
ScratchJahd2011
Blaze349
Blaze349_test
scratch342
scratch342_test
year5l

Last edited by Blaze349 (Feb. 18, 2014 09:31:53)

ProdigyZeta7
Scratcher
1000+ posts

SPRITE GROUPS!!!!!!!

Blaze349 wrote:

we should add a way of making sprite groups so a block like
point towards [nearest sprite group"enemies" v]
This is far too specific to be used for a wide range of projects. And I'm sure there are workarounds.

Last edited by ProdigyZeta7 (Feb. 21, 2014 23:03:25)

Blaze349
Scratcher
1000+ posts

SPRITE GROUPS!!!!!!!

ProdigyZeta7 wrote:

Blaze349 wrote:

we should add a way of making sprite groups so a block like
point towards [nearest sprite group"enemies" v]
this would help recreate games like sonic I don't think you can do scripting for homing attacks yet
I don't understand how this would work and I'm pretty sure there are workarounds.
also there should be a way of when the ground starts to point downhill/uphill/anydirection sprite you're sprite will follow that direction not left right but up down
Or how about:
point in direction ([direction v] of [ground v])
Then if you want it to move in the normal (perpendicular to the angle of the surface), turn it 90 degrees counterclockwise (if moving right) or clockwise (if moving left).
confused I still like the idea of grouping sprites

Last edited by Blaze349 (Jan. 12, 2014 23:23:05)

Blaze349
Scratcher
1000+ posts

SPRITE GROUPS!!!!!!!

ProdigyZeta7 wrote:

Blaze349 wrote:

we should add a way of making sprite groups so a block like
point towards [nearest sprite group"enemies" v]
this would help recreate games like sonic I don't think you can do scripting for homing attacks yet
I don't understand how this would work and I'm pretty sure there are workarounds.
you would have to group the sprites yourself and the computer stores them or catagorizing the sprites into the groups if you are using them
Blaze349
Scratcher
1000+ posts

SPRITE GROUPS!!!!!!!

are sprite groups happening or not
ScratchJahd2011
Scratcher
500+ posts

SPRITE GROUPS!!!!!!!

I'm not really sure, also homing (missiles?) is possible now, unless you mean enemy AI (which is also possible).
Blaze349
Scratcher
1000+ posts

SPRITE GROUPS!!!!!!!

ScratchJahd2011 wrote:

I'm not really sure, also homing (missiles?) is possible now,).
really how?

Last edited by Blaze349 (Feb. 18, 2014 08:13:32)

ScratchJahd2011
Scratcher
500+ posts

SPRITE GROUPS!!!!!!!

Blaze349 wrote:

ScratchJahd2011 wrote:

I'm not really sure, also homing (missiles?) is possible now,).
really how?

This.
when i receive [fire missile v]
show
forever
if <(distance to [player/enemy v])<(50)>
point towards [player/enemy v]
move (10) steps
else
repeat (pick random (1) to (5))
move (5) steps
end
point in direction (pick random (-360) to (360)
end
end

Blaze349
Scratcher
1000+ posts

SPRITE GROUPS!!!!!!!

ScratchJahd2011 wrote:

Blaze349 wrote:

ScratchJahd2011 wrote:

I'm not really sure, also homing (missiles?) is possible now,).
really how?

This.
when i receive [fire missile v]
show
forever
if <(distance to [player/enemy v])<(50)>
point towards [player/enemy v]
move (10) steps
else
repeat (pick random (1) to (5))
move (5) steps
end
point in direction (pick random (-360) to (360)
end
end

but what if you want use multiple sprites not clones(badniks and the flying ones)
how would that work as in to point to nearest
ScratchJahd2011
Scratcher
500+ posts

SPRITE GROUPS!!!!!!!

Blaze349 wrote:

ScratchJahd2011 wrote:

Blaze349 wrote:

ScratchJahd2011 wrote:

I'm not really sure, also homing (missiles?) is possible now,).
really how?

This.
when i receive [fire missile v]
show
forever
if <(distance to [player/enemy v])<(50)>
point towards [player/enemy v]
move (10) steps
else
repeat (pick random (1) to (5))
move (5) steps
end
point in direction (pick random (-360) to (360)
end
end

but what if you want use multiple sprites not clones(badniks and the flying ones)
how would that work as in to point to nearest



There, now you have a good point… (I don't know really…)
Blaze349
Scratcher
1000+ posts

SPRITE GROUPS!!!!!!!

ScratchJahd2011 wrote:

Blaze349 wrote:

ScratchJahd2011 wrote:

Blaze349 wrote:

ScratchJahd2011 wrote:

I'm not really sure, also homing (missiles?) is possible now,).
really how?

This.
when i receive [fire missile v]
show
forever
if <(distance to [player/enemy v]) < [50]>
point towards [player/enemy v]
move (10) steps
else
repeat (pick random (1) to (5))
move (5) steps
end
point in direction (pick random (-360) to (360)
end
end

but what if you want use multiple sprites not clones(badniks and the flying ones)
how would that work as in to point to nearest



There, now you have a good point… (I don't know really…)
thats why we need sprite groups

when i receive [fire missile v]
show
forever
if <(distance to nearest sprite of sprite group [ enemy v]::sensing) < [50]>
point towards nearest sprite of sprite group[enemy v]::motion
move (10) steps
else
repeat (pick random (1) to (5))
move (5) steps
end
point in direction (pick random (-360) to (360)
end
end

Last edited by Blaze349 (Feb. 18, 2014 09:12:48)

ScratchJahd2011
Scratcher
500+ posts

SPRITE GROUPS!!!!!!!

Blaze349 wrote:

ScratchJahd2011 wrote:

Blaze349 wrote:

ScratchJahd2011 wrote:

Blaze349 wrote:

ScratchJahd2011 wrote:

I'm not really sure, also homing (missiles?) is possible now,).
really how?

This.
when i receive [fire missile v]
show
forever
if <(distance to [player/enemy v]) < [50]>
point towards [player/enemy v]
move (10) steps
else
repeat (pick random (1) to (5))
move (5) steps
end
point in direction (pick random (-360) to (360)
end
end

but what if you want use multiple sprites not clones(badniks and the flying ones)
how would that work as in to point to nearest



There, now you have a good point… (I don't know really…)
thats why we need sprite groups

when i receive [fire missile v]
show
forever
if <(distance to nearest sprite of sprite group [ enemy v]::sensing) < [50]>
point towards nearest sprite of sprite group[enemy v]::motion
move (10) steps
else
repeat (pick random (1) to (5))
move (5) steps
end
point in direction (pick random (-360) to (360)
end
end


Okay, you have a point. 1+
Blaze349
Scratcher
1000+ posts

SPRITE GROUPS!!!!!!!

bump
heave HO!!!!!!
Blaze349
Scratcher
1000+ posts

SPRITE GROUPS!!!!!!!

ScratchJahd2011 wrote:

Blaze349 wrote:

ScratchJahd2011 wrote:

Blaze349 wrote:

ScratchJahd2011 wrote:

Blaze349 wrote:

ScratchJahd2011 wrote:

I'm not really sure, also homing (missiles?) is possible now,).
really how?

This.
when i receive [fire missile v]
show
forever
if <(distance to [player/enemy v]) < [50]>
point towards [player/enemy v]
move (10) steps
else
repeat (pick random (1) to (5))
move (5) steps
end
point in direction (pick random (-360) to (360)
end
end

but what if you want use multiple sprites not clones(badniks and the flying ones)
how would that work as in to point to nearest



There, now you have a good point… (I don't know really…)
thats why we need sprite groups

when i receive [fire missile v]
show
forever
if <(distance to nearest sprite of sprite group [ enemy v]::sensing) < [50]>
point towards nearest sprite of sprite group[enemy v]::motion
move (10) steps
else
repeat (pick random (1) to (5))
move (5) steps
end
point in direction (pick random (-360) to (360)
end
end


Okay, you have a point. 1+
yay 1 support
year5l
New Scratcher
1 post

SPRITE GROUPS!!!!!!!

+1
scratch342
Scratcher
55 posts

SPRITE GROUPS!!!!!!!

+1
Blaze349
Scratcher
1000+ posts

SPRITE GROUPS!!!!!!!

bump
Blaze349
Scratcher
1000+ posts

SPRITE GROUPS!!!!!!!

when green flag clicked
forever

change [support v] by (((999999999) * (999999999)))
end
xlk
Scratcher
100+ posts

SPRITE GROUPS!!!!!!!

Groups would be awesome, for the “touching or or or or or…” but for pointing to closest of group… that can be worked around, and in my opinion is obsolete like the bounce on edge block.
Blaze349
Scratcher
1000+ posts

SPRITE GROUPS!!!!!!!

xlk wrote:

Groups would be awesome, for the “touching or or or or or…” but for pointing to closest of group… that can be worked around, and in my opinion is obsolete like the bounce on edge block.
what is the workaround

Powered by DjangoBB