help with script for Physics and Collisions with a scrolling project
id: 726972
category: Help with Scripts
posts: 6
Dec 1, 2023 18:43:37
help with script for Physics and Collisions with a scrolling project
view on scratch
view on legacy ocular
The_Legendary_Jello
loading
There is this project im trying to make. I need help with four way collision scripts that build of the collision scripts already there (link to the project below) and allow for going up hills and being hit by moving objects.
link: https://scratch.mit.edu/projects/933869482/
link: https://scratch.mit.edu/projects/933869482/
Dec 3, 2023 06:41:39
help with script for Physics and Collisions with a scrolling project
view on scratch
view on legacy ocular
MasterofTheBrick
loading
All collision detection scripts can be reduced down to the basics - initiating incremental movement, then running a conditional to check for contact with any platforms/objects and reverting back to the previous coordinates if needed. The project already utilises this using colour detection so it’s a simple matter of replicating it for movement on the x-axis.
This article provides a more in-depth tutorial if needed.
This article provides a more in-depth tutorial if needed.
Dec 3, 2023 13:48:58
help with script for Physics and Collisions with a scrolling project
view on scratch
view on legacy ocular
1Milj
loading
Have you tried making the game check if touching the level runs a custom block without screen refresh to bring it up immediatly? I don't know if it will work and if you use a touching sprite block then you might want to search for a tutorial on how to detect certan collisions.
Mar 30, 2024 22:59:39
help with script for Physics and Collisions with a scrolling project
view on scratch
view on legacy ocular
mhhsg
loading
scratch message pls add block physics and throwing physics
Mar 30, 2024 23:00:49
help with script for Physics and Collisions with a scrolling project
view on scratch
view on legacy ocular
mhhsg
loading
define (physics)
go to [ block and push]
Mar 30, 2024 23:03:53
help with script for Physics and Collisions with a scrolling project
view on scratch
view on legacy ocular
56-s
loading
A very simple way of doing it is this
or you could replace it with a change x by code so you don't go thourgh walls.
when green flag clicked
forever
change y by (-10)
if <touching [ ground] ?> then
change y by (10)
end
or you could replace it with a change x by code so you don't go thourgh walls.