Discuss Scratch

JujuBeeMr
Scratcher
24 posts

help for games plz

hey yall i just need to ask how make sprites move, but they have to stick to a path. (for tpt) i tried
when green flag clicked
forever
repeat until <touching color [#0ff4a7] ?>
go to [random position v]
end

Last edited by JujuBeeMr (April 27, 2023 01:35:34)


https://media.tenor.com/8lVyWHWe5IQAAAAi/eggdog-doge.gif yaya egg btw this is my signature and as always,
when [ life status v] > (your alive) 
forever
imagine
program
share
end
BreadcatGames
Scratcher
1000+ posts

help for games plz

This should be in help with scripts
Mini_Man2013
Scratcher
100+ posts

help for games plz

u can do this:

when green flag clicked
forever
if <key [left v] pressed?> then
move left
end
if <key [right v] pressed?> then
move right
end
end


MINI_MAN2013!!!
JujuBeeMr
Scratcher
24 posts

help for games plz

but i want the guest to be moved by ai not the player like what i have rn is
when green flag clicked
forever

glide (5) secs to x: (random position) y: (random position)
end

Last edited by JujuBeeMr (April 27, 2023 14:13:12)


https://media.tenor.com/8lVyWHWe5IQAAAAi/eggdog-doge.gif yaya egg btw this is my signature and as always,
when [ life status v] > (your alive) 
forever
imagine
program
share
end
JujuBeeMr
Scratcher
24 posts

help for games plz

Mini_Man2013 wrote:

u can do this:

when green flag clicked
forever
if <key [left v] pressed?> then
move left
end
if <key [right v] pressed?> then
move right
end
end
that would make it so the player moves it

https://media.tenor.com/8lVyWHWe5IQAAAAi/eggdog-doge.gif yaya egg btw this is my signature and as always,
when [ life status v] > (your alive) 
forever
imagine
program
share
end
Mini_Man2013
Scratcher
100+ posts

help for games plz

JujuBeeMr wrote:

Mini_Man2013 wrote:

u can do this:

when green flag clicked
forever
if <key [left v] pressed?> then
move left
end
if <key [right v] pressed?> then
move right
end
end
that would make it so the player moves it
k


MINI_MAN2013!!!
Kites2022-2023
Scratcher
7 posts

help for games plz

JujuBeeMr wrote:

hey yall i just need to ask how make sprites move, but they have to stick to a path. (for tpt) i tried
when green flag clicked
forever
repeat until <touching color [#0ff4a7] ?>
go to [random position v]
end






[/quote]
Nice Try,
To make a sprite move copy the code bellow:
when this sprite clicked
move (amount) steps

or

when green flag clicked
move (amount) steps

or

when [KEY v] key pressed
move (amount) steps
Kites2022-2023
Scratcher
7 posts

help for games plz

JujuBeeMr wrote:

hey yall i just need to ask how make sprites move, but they have to stick to a path. (for tpt) i tried
when green flag clicked
forever
repeat until <touching color [#0ff4a7] ?>
go to [random position v]
end






[/quote]
Nice Try,
To make a sprite move copy the code bellow:
when this sprite clicked
move (amount) steps

or

when green flag clicked
move (amount) steps

or

when [KEY v] key pressed
move (amount) steps
JujuBeeMr
Scratcher
24 posts

help for games plz

Kites2022-2023 wrote:

JujuBeeMr wrote:

hey yall i just need to ask how make sprites move, but they have to stick to a path. (for tpt) i tried
when green flag clicked
forever
repeat until <touching color [#0ff4a7] ?>
go to [random position v]
end






[/quote]
Nice Try,
To make a sprite move copy the code bellow:
when this sprite clicked
move (amount) steps

or

when green flag clicked
move (amount) steps

or

when [KEY v] key pressed
move (amount) steps[/quote]
I NEED THERE MOVE MENT TO BE AI GENERATED BUT STILL STICK TO A PATHH

https://media.tenor.com/8lVyWHWe5IQAAAAi/eggdog-doge.gif yaya egg btw this is my signature and as always,
when [ life status v] > (your alive) 
forever
imagine
program
share
end
JujuBeeMr
Scratcher
24 posts

help for games plz

AIGHT PEOPLE SINCE IT SEEMS NO ONE KNOWS HOW TO DO THIS, I OFFER REWARD. FIRST PERSON TO FIND OUT HOW TO MAKE GUEST MOVE RANDOMLY BUT STICK TO A PATH WINS A FOLLOW ALSO THE PATH IS NOT A SPRITE. https://media.tenor.com/hhaL2BZOw84AAAAd/leg-dog.gif///https://media.tenor.com/hhaL2BZOw84AAAAd/leg-dog.gif/// and lastly to advertise for scratch,
when green flag clicked
forever
imagine program share
end

Last edited by JujuBeeMr (April 29, 2023 18:10:55)


https://media.tenor.com/8lVyWHWe5IQAAAAi/eggdog-doge.gif yaya egg btw this is my signature and as always,
when [ life status v] > (your alive) 
forever
imagine
program
share
end
JujuBeeMr
Scratcher
24 posts

help for games plz

hey yall im back and worrkin! yall, let me just say, ITS SO FUN TO MAKE REWIND btw advertise and i will play your games

https://media.tenor.com/8lVyWHWe5IQAAAAi/eggdog-doge.gif yaya egg btw this is my signature and as always,
when [ life status v] > (your alive) 
forever
imagine
program
share
end
PaperAviator
Scratcher
32 posts

help for games plz

how is the path defined? is it just a area of color in a sprite or background or something?

Thanks, ~PaperAviator
medians
Scratcher
1000+ posts

help for games plz

Can you send the link to the project please so we can help and not have to guess the solution?

JujuBeeMr wrote:

but i want the guest to be moved by ai not the player like what i have rn is
when green flag clicked
forever

glide (5) secs to x: (random position) y: (random position)
end
I think you mean like this:
glide (5) secs to x: (pick random (-240) to (240)) y: (pick random (-180) to (180))

Medians bamboozled by 3.0 (version 3.0): https://scratch.mit.edu/projects/979822351/
hi875230163394: You're similar to valve in that you both hate a certain number…
Scratch 0.x, 1.x, 2.x, 3.x and LogoBlocks Archives
Bamboozlement: https://scratch.mit.edu/studios/33739789
Years on internet: 15 (soon 16)
medians: Oh god not this utc - 12 thing again..
Fun_Cupcake_i81: What, were you expecting not to see the utc - 12 thing again? THE UTC - 12 THIGN ALWAYS RETURNS. ALWAYS.
medians: I knew it would happen. I was the one who started it last year.
Fun_Cupcake_i81: Well then if you didn't want it back maybe you need to time travel to last year and fix that

Oh wait if you could time travel I think we all know exactly when you would go-
user1: That picture is from 2.0. Now he’s at my house and is my pet.
user2: But this is medians we're talking about, so “from 2.0” can mean the same thing as “from five seconds ago”.

Detect Scratch version here
My other accounts: @selfexplanatory @modesties @chaircard @fireflyhero @dividendyield @colloids @radians @skeuamorphism @dihectogon @anglebisector @aau- @EditBlockColors @AdamantOrb @MoongeistBeam @festively @Ampharos_ @straightforwardness @interchangeably
i trolled redcat LOL






if you see this
{what method did you use::control hat
answer on profile ::motion
} ::operators

;
coIIide
Scratcher
100+ posts

help for games plz

medians wrote:

Can you send the link to the project please so we can help and not have to guess the solution?

JujuBeeMr wrote:

but i want the guest to be moved by ai not the player like what i have rn is
when green flag clicked
forever

glide (5) secs to x: (random position) y: (random position)
end
I think you mean like this:
glide (5) secs to x: (pick random (-240) to (240)) y: (pick random (-180) to (180))
It's not glide, it's go to, plus
go to [random position v]
and
glide (1) secs to (random position v) :: motion
both exist in 3.0.

hello
this is my signature, it pops up under every post i make :)


medians
Scratcher
1000+ posts

help for games plz

coIIide wrote:

medians wrote:

Can you send the link to the project please so we can help and not have to guess the solution?

JujuBeeMr wrote:

but i want the guest to be moved by ai not the player like what i have rn is
when green flag clicked
forever

glide (5) secs to x: (random position) y: (random position)
end
I think you mean like this:
glide (5) secs to x: (pick random (-240) to (240)) y: (pick random (-180) to (180))
It's not glide, it's go to, plus
go to [random position v]
and
glide (1) secs to (random position v) :: motion
both exist in 3.0.
Oh my god okay I was confused because of the fact they put that, and I completely forgot that they implemented the glide to sprite/random pos/mouse block

Medians bamboozled by 3.0 (version 3.0): https://scratch.mit.edu/projects/979822351/
hi875230163394: You're similar to valve in that you both hate a certain number…
Scratch 0.x, 1.x, 2.x, 3.x and LogoBlocks Archives
Bamboozlement: https://scratch.mit.edu/studios/33739789
Years on internet: 15 (soon 16)
medians: Oh god not this utc - 12 thing again..
Fun_Cupcake_i81: What, were you expecting not to see the utc - 12 thing again? THE UTC - 12 THIGN ALWAYS RETURNS. ALWAYS.
medians: I knew it would happen. I was the one who started it last year.
Fun_Cupcake_i81: Well then if you didn't want it back maybe you need to time travel to last year and fix that

Oh wait if you could time travel I think we all know exactly when you would go-
user1: That picture is from 2.0. Now he’s at my house and is my pet.
user2: But this is medians we're talking about, so “from 2.0” can mean the same thing as “from five seconds ago”.

Detect Scratch version here
My other accounts: @selfexplanatory @modesties @chaircard @fireflyhero @dividendyield @colloids @radians @skeuamorphism @dihectogon @anglebisector @aau- @EditBlockColors @AdamantOrb @MoongeistBeam @festively @Ampharos_ @straightforwardness @interchangeably
i trolled redcat LOL






if you see this
{what method did you use::control hat
answer on profile ::motion
} ::operators

;
Mini_Man2013
Scratcher
100+ posts

help for games plz

JujuBeeMr wrote:

Mini_Man2013 wrote:

u can do this:

when green flag clicked
forever
if <key [left v] pressed?> then
move left
end
if <key [right v] pressed?> then
move right
end
end
that would make it so the player moves it
ik but it will stick to the path


MINI_MAN2013!!!
quackTWO
Scratcher
29 posts

help for games plz

JujuBeeMr wrote:

AIGHT PEOPLE SINCE IT SEEMS NO ONE KNOWS HOW TO DO THIS, I OFFER REWARD. FIRST PERSON TO FIND OUT HOW TO MAKE GUEST MOVE RANDOMLY BUT STICK TO A PATH WINS A FOLLOW ALSO THE PATH IS NOT A SPRITE. https://media.tenor.com/hhaL2BZOw84AAAAd/leg-dog.gif///https://media.tenor.com/hhaL2BZOw84AAAAd/leg-dog.gif/// and lastly to advertise for scratch,
when green flag clicked
forever
imagine program share
end

Make a list with all of the coordinates for the “path”. Make an X and Y list to separate them. Make the character move across the path, changing the index number by either 1 or -1. Make a variable for the index, and change it by a pick random every time he arrives at a place. This will make it so it doesn’t go off the path. Attach both the X value at the index and the Y value at the index to a glide object and your done

glide (1) secs to x: (item ((idxv) of [x v] :: list) y: (item ((idxv) of [y v] :: list)

Last edited by quackTWO (May 8, 2023 08:51:08)

JujuBeeMr
Scratcher
24 posts

help for games plz

quackTWO wrote:

JujuBeeMr wrote:

AIGHT PEOPLE SINCE IT SEEMS NO ONE KNOWS HOW TO DO THIS, I OFFER REWARD. FIRST PERSON TO FIND OUT HOW TO MAKE GUEST MOVE RANDOMLY BUT STICK TO A PATH WINS A FOLLOW ALSO THE PATH IS NOT A SPRITE. https://media.tenor.com/hhaL2BZOw84AAAAd/leg-dog.gif///https://media.tenor.com/hhaL2BZOw84AAAAd/leg-dog.gif/// and lastly to advertise for scratch,
when green flag clicked
forever
imagine program share
end

Make a list with all of the coordinates for the “path”. Make an X and Y list to separate them. Make the character move across the path, changing the index number by either 1 or -1. Make a variable for the index, and change it by a pick random every time he arrives at a place. This will make it so it doesn’t go off the path. Attach both the X value at the index and the Y value at the index to a glide object and your done

glide (1) secs to x: (item ((idxv) of [x v] :: list) y: (item ((idxv) of [y v] :: list)


let me clairify, the path is not a sprite. it is made by pen. although i like how much effort your putting in this!

https://media.tenor.com/8lVyWHWe5IQAAAAi/eggdog-doge.gif yaya egg btw this is my signature and as always,
when [ life status v] > (your alive) 
forever
imagine
program
share
end
JujuBeeMr
Scratcher
24 posts

help for games plz

PaperAviator wrote:

how is the path defined? is it just a area of color in a sprite or background or something?


its pen so……. just color yes

https://media.tenor.com/8lVyWHWe5IQAAAAi/eggdog-doge.gif yaya egg btw this is my signature and as always,
when [ life status v] > (your alive) 
forever
imagine
program
share
end
JujuBeeMr
Scratcher
24 posts

help for games plz

more help plz. soooo for some dumb reason the switch costume block isnt working! ik it isnt a script messing it upp bc i made a detector! its for a game jam so i need help quick! what i have rn is
when [ space v] key pressed
[scratchblocks]

if <[player] = [2]> then
switch costume to [ my oc- attack v]
play sound [ hup v]
switch costume to [ my oc- neutral v]
end
[/scratchblocks]

Last edited by JujuBeeMr (May 10, 2023 03:36:36)


https://media.tenor.com/8lVyWHWe5IQAAAAi/eggdog-doge.gif yaya egg btw this is my signature and as always,
when [ life status v] > (your alive) 
forever
imagine
program
share
end

Powered by DjangoBB