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)
- 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
- 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)
- JujuBeeMr
- Scratcher
24 posts
help for games plz
that would make it so the player moves it 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
- Scratcher
100+ posts
help for games plz
kthat would make it so the player moves it 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
- Kites2022-2023
- Scratcher
7 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 triedwhen 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
hey yall i just need to ask how make sprites move, but they have to stick to a path. (for tpt) i triedwhen 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
hey yall i just need to ask how make sprites move, but they have to stick to a path. (for tpt) i triedwhen 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
- 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)
- 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
- 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?
- 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?
I think you mean like this: but i want the guest to be moved by ai not the player like what i have rn iswhen green flag clicked
forever
glide (5) secs to x: (random position) y: (random position)
end
glide (5) secs to x: (pick random (-240) to (240)) y: (pick random (-180) to (180))
- coIIide
- Scratcher
100+ posts
help for games plz
It's not glide, it's go to, plus Can you send the link to the project please so we can help and not have to guess the solution?I think you mean like this: but i want the guest to be moved by ai not the player like what i have rn iswhen green flag clicked
forever
glide (5) secs to x: (random position) y: (random position)
endglide (5) secs to x: (pick random (-240) to (240)) y: (pick random (-180) to (180))
go to [random position v]both exist in 3.0.
and
glide (1) secs to (random position v) :: motion
- medians
- Scratcher
1000+ posts
help for games plz
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 blockIt's not glide, it's go to, plus Can you send the link to the project please so we can help and not have to guess the solution?I think you mean like this: but i want the guest to be moved by ai not the player like what i have rn iswhen green flag clicked
forever
glide (5) secs to x: (random position) y: (random position)
endglide (5) secs to x: (pick random (-240) to (240)) y: (pick random (-180) to (180))go to [random position v]both exist in 3.0.
and
glide (1) secs to (random position v) :: motion
- Mini_Man2013
- Scratcher
100+ posts
help for games plz
ik but it will stick to the paththat would make it so the player moves it 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
- quackTWO
- Scratcher
29 posts
help for games plz
https://media.tenor.com/hhaL2BZOw84AAAAd/leg-dog.gif///https://media.tenor.com/hhaL2BZOw84AAAAd/leg-dog.gif/// and lastly to advertise for scratch,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.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
https://media.tenor.com/hhaL2BZOw84AAAAd/leg-dog.gif///https://media.tenor.com/hhaL2BZOw84AAAAd/leg-dog.gif/// and lastly to advertise for scratch,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.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 doneglide (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!
- JujuBeeMr
- Scratcher
24 posts
help for games plz
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
- 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)