Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » i need help doing list connecting
- ClassicRT
- Scratcher
11 posts
i need help doing list connecting
I'm trying to make this game and i really want the lists thing to connect. idk if it's overlayed time or something like that but here's what i did so far
like i want it to be like the same lists to connect and i did and it works, and for it to work i want the list to be set to what key your suppose to press to make sure it connects and if it doesn't (like the list isn't the same together, even if their different) it stops the project, which is fine but when it's connected (as in the same lists) and i place the entire block together it just like stops the entire project and the lists are true. is there any help i can get from it?
when green flag clicked
forever
if < <(list :: list) = (list2 :: list2)>> then
end
end
like i want it to be like the same lists to connect and i did and it works, and for it to work i want the list to be set to what key your suppose to press to make sure it connects and if it doesn't (like the list isn't the same together, even if their different) it stops the project, which is fine but when it's connected (as in the same lists) and i place the entire block together it just like stops the entire project and the lists are true. is there any help i can get from it?
Last edited by ClassicRT (Dec. 6, 2021 22:42:26)
- ClassicRT
- Scratcher
11 posts
i need help doing list connecting
sorry if it looks weird, i haven't done forums in years but plz help this can be helpful for me i mean the code blocks
Last edited by ClassicRT (Dec. 6, 2021 22:43:04)
- helloworldbyeworld
- Scratcher
1000+ posts
i need help doing list connecting
Let me clarify:
If the lists are the same, then you want to set an item of the list to a value (the key the user is supposed to press).
If not, then stop the project.
Try this script:
If the lists are the same, then you want to set an item of the list to a value (the key the user is supposed to press).
If not, then stop the project.
Try this script:
when green flag clicked
forever
if <(list1 :: list) = (list2 :: list)> then
replace item (1) of [list1 v] with [key you’re supposed to press]
else
stop [all v]
end
end
Helloworldbyeworld | 1200+ posts
Have a great day
- ClassicRT
- Scratcher
11 posts
i need help doing list connecting
i tried it, it didn't work is there another solution? or should i like give you the project link on turbowarp?
Last edited by ClassicRT (Dec. 7, 2021 01:10:16)
- ClassicRT
- Scratcher
11 posts
i need help doing list connecting
Let me clarify:
If the lists are the same, then you want to set an item of the list to a value (the key the user is supposed to press).
If not, then stop the project.
Try this script:when green flag clicked
forever
if <(list1 :: list) = (list2 :: list)> then
replace item (1) of [list1 v] with [key you’re supposed to press]
else
stop [all v]
end
end
okay wait a second i did this with only the operator with list variable and tested it and by the first time i did it together it was true, and then after i did another it was false even it was the same numbers.
oh wait i forgot about the original post i forgot the if else block, i'm sorry i haven't dones forums frequently.
Last edited by ClassicRT (Dec. 7, 2021 01:19:40)
- helloworldbyeworld
- Scratcher
1000+ posts
i need help doing list connecting
Can you give me the turbowarp link? i tried it, it didn't work is there another solution? or should i like give you the project link on turbowarp?
Helloworldbyeworld | 1200+ posts
Have a great day
- ClassicRT
- Scratcher
11 posts
i need help doing list connecting
Can you give me the turbowarp link? i tried it, it didn't work is there another solution? or should i like give you the project link on turbowarp?
sure: https://turbowarp.org/584654260
- Discussion Forums
- » Help with Scripts
- » i need help doing list connecting