Grid Based movement example help (SOLVED)

Flowlab Game Creator - yet another Taile Gamougg spinoff
My someone please help me with this? In level 5, I placed objects that are supposed to damage the player, but the player can’t touch them because of the way the example is designed. I want the player to only directly be able to touch the “Pain” object, which hurts them.

Idk how to actually, but I stumbled upon this before, I just used the Square proximity and made it so it could detect the player

1 Like

image

1 Like

Basically what I’m trying to say is that you know how the Grid-Based Movement Example disallows the player to collide with objects? I want to allow the player to collide with certain objects; one in particular.

1 Like

Wait,somethin aint righ-PLAY ANIMAITONS IN A GAMOOG GAME!!!

1 Like

Well, you could use a raycast to check if the next grid square would be the object you want it to collied with, and If it is, then it’ll move, otherwise it goes into the other raycast that makes sure it doesn’t collide with anything else. Does that make sense?

2 Likes

Kind of, but could you send a screenshot? That would be very helpful; thanks.

1 Like

Ok, so I’m on mobile rn, so I couldn’t really get a good screenshot for you, but I was able to (painstakingly) cobble something together for you

Here it is

{“data”:{“behavior”:{“v”:“2”,“nodes”:[{“inputCount”:0,“outputCount”:0,“name”:“grid movement “,“behaviorType”:“logic.NodeGroup”,“x”:180,“y”:256,“group”:””,“id”:“135b75b87a5e914f”,“isMenuItem”:false},{“inputCount”:3,“outputCount”:2,“name”:“RayCast”,“behaviorType”:“logic.components.RayCast”,“x”:540,“y”:288,“group”:“135b75b87a5e914f”,“id”:“2208f785c4db4946”,“targetClassId”:0,“direction”:180,“length”:32},{“inputCount”:0,“outputCount”:2,“name”:“Keyboard”,“behaviorType”:“logic.triggers.Keyboard”,“x”:180,“y”:256,“group”:“135b75b87a5e914f”,“id”:“220896ee4d74d047”,“keyCode”:37,“repeats”:false,“delay”:0},{“inputCount”:3,“outputCount”:2,“name”:“RayCast”,“behaviorType”:“logic.components.RayCast”,“x”:540,“y”:640,“group”:“135b75b87a5e914f”,“id”:“2208f31229e4ee41”,“targetClassId”:0,“direction”:90,“length”:32},{“inputCount”:4,“outputCount”:2,“name”:“Position”,“behaviorType”:“logic.properties.Position”,“x”:900,“y”:544,“group”:“135b75b87a5e914f”,“id”:“220a4a552d904341”,“pixelUnits”:false,“resetVelocity”:false},{“inputCount”:4,“outputCount”:2,“name”:“Position”,“behaviorType”:“logic.properties.Position”,“x”:900,“y”:384,“group”:“135b75b87a5e914f”,“id”:“220a4cea02159a46”,“pixelUnits”:false,“resetVelocity”:false},{“inputCount”:0,“outputCount”:2,“name”:“Keyboard”,“behaviorType”:“logic.triggers.Keyboard”,“x”:180,“y”:448,“group”:“135b75b87a5e914f”,“id”:“2208930e2f1fcc44”,“keyCode”:40,“repeats”:false,“delay”:0},{“inputCount”:3,“outputCount”:2,“name”:“RayCast”,“behaviorType”:“logic.components.RayCast”,“x”:540,“y”:448,“group”:“135b75b87a5e914f”,“id”:“2208f56b9a641242”,“targetClassId”:0,“direction”:270,“length”:32},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:720,“y”:224,“group”:“135b75b87a5e914f”,“id”:“2209f4808a552949”,“startVal”:-1,“tag”:""},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:720,“y”:384,“group”:“135b75b87a5e914f”,“id”:“220a07768b7de34e”,“startVal”:-1,“tag”:""},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:720,“y”:32,“group”:“135b75b87a5e914f”,“id”:“22081284d122d040”,“startVal”:1,“tag”:""},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:720,“y”:544,“group”:“135b75b87a5e914f”,“id”:“220a137ec7eb1848”,“startVal”:1,“tag”:""},{“inputCount”:4,“outputCount”:2,“name”:“Position”,“behaviorType”:“logic.properties.Position”,“x”:900,“y”:32,“group”:“135b75b87a5e914f”,“id”:“2207c9a0c5a6084c”,“pixelUnits”:false,“resetVelocity”:false},{“inputCount”:3,“outputCount”:2,“name”:“RayCast”,“behaviorType”:“logic.components.RayCast”,“x”:540,“y”:96,“group”:“135b75b87a5e914f”,“id”:“22076979ba909444”,“targetClassId”:0,“direction”:0,“length”:32},{“inputCount”:0,“outputCount”:2,“name”:“Keyboard”,“behaviorType”:“logic.triggers.Keyboard”,“x”:180,“y”:352,“group”:“135b75b87a5e914f”,“id”:“2208958077924144”,“keyCode”:38,“repeats”:false,“delay”:0},{“inputCount”:4,“outputCount”:2,“name”:“Position”,“behaviorType”:“logic.properties.Position”,“x”:900,“y”:224,“group”:“135b75b87a5e914f”,“id”:“220a4f8b23726140”,“pixelUnits”:false,“resetVelocity”:false},{“inputCount”:0,“outputCount”:2,“name”:“Keyboard”,“behaviorType”:“logic.triggers.Keyboard”,“x”:180,“y”:160,“group”:“135b75b87a5e914f”,“id”:“22072f848902ba43”,“keyCode”:39,“repeats”:false,“delay”:0},{“inputCount”:3,“outputCount”:2,“name”:“RayCast”,“behaviorType”:“logic.components.RayCast”,“x”:360,“y”:384,“group”:“135b75b87a5e914f”,“id”:“13567270100a164e”,“notes”:"set this to the pain object ",“targetClassId”:0,“direction”:270,“length”:32,“earlyOut”:false},{“inputCount”:3,“outputCount”:2,“name”:“RayCast”,“behaviorType”:“logic.components.RayCast”,“x”:360,“y”:32,“group”:“135b75b87a5e914f”,“id”:“135675a43882a34d”,“notes”:"Set this to the pain object ",“targetClassId”:0,“direction”:0,“length”:32,“earlyOut”:false},{“inputCount”:3,“outputCount”:2,“name”:“RayCast”,“behaviorType”:“logic.components.RayCast”,“x”:360,“y”:544,“group”:“135b75b87a5e914f”,“id”:“13567b9078638f45”,“notes”:"set this to the pain object ",“targetClassId”:0,“direction”:90,“length”:32,“earlyOut”:false},{“inputCount”:3,“outputCount”:2,“name”:“RayCast”,“behaviorType”:“logic.components.RayCast”,“x”:360,“y”:224,“group”:“135b75b87a5e914f”,“id”:“13568d8fc1798340”,“notes”:"set this to the pain object ",“targetClassId”:0,“direction”:180,“length”:32,“earlyOut”:false}],“links”:[{“input_id”:“2209f4808a552949i1”,“output_id”:“2208f785c4db4946o1”},{“input_id”:“13568d8fc1798340i2”,“output_id”:“220896ee4d74d047o0”},{“input_id”:“220a137ec7eb1848i1”,“output_id”:“2208f31229e4ee41o1”},{“input_id”:“13567b9078638f45i2”,“output_id”:“2208930e2f1fcc44o0”},{“input_id”:“220a07768b7de34ei1”,“output_id”:“2208f56b9a641242o1”},{“input_id”:“220a4f8b23726140i2”,“output_id”:“2209f4808a552949o0”},{“input_id”:“220a4cea02159a46i3”,“output_id”:“220a07768b7de34eo0”},{“input_id”:“2207c9a0c5a6084ci2”,“output_id”:“22081284d122d040o0”},{“input_id”:“220a4a552d904341i3”,“output_id”:“220a137ec7eb1848o0”},{“input_id”:“22081284d122d040i1”,“output_id”:“22076979ba909444o1”},{“input_id”:“13567270100a164ei2”,“output_id”:“2208958077924144o0”},{“input_id”:“135675a43882a34di2”,“output_id”:“22072f848902ba43o0”},{“input_id”:“220a07768b7de34ei1”,“output_id”:“13567270100a164eo0”},{“input_id”:“2208f56b9a641242i2”,“output_id”:“13567270100a164eo1”},{“input_id”:“22081284d122d040i1”,“output_id”:“135675a43882a34do0”},{“input_id”:“22076979ba909444i2”,“output_id”:“135675a43882a34do1”},{“input_id”:“220a137ec7eb1848i1”,“output_id”:“13567b9078638f45o0”},{“input_id”:“2208f31229e4ee41i2”,“output_id”:“13567b9078638f45o1”},{“input_id”:“2209f4808a552949i1”,“output_id”:“13568d8fc1798340o0”},{“input_id”:“2208f785c4db4946i2”,“output_id”:“13568d8fc1798340o1”}]}}}

Basically it checks for the pain object and if there isn’t one, then it moves normally. If there is one, then it goes ahead and moves into that space. Let me know if it isn’t working or if you need additional explaination/assistance

1 Like

For some reason, it isn’t importing.

1 Like

Ok, here is the best screenshot I could get. Idk why it wasn’t importing, lol

2 Likes

Thank you very much! It works! Sorry I’m out of likes; have this:


(For anyone searching for something like this later, Here is the keyword: How to allow the player to touch certain objects with the grid-based movement example)

3 Likes