i have a script for an object to hit a wall and flip then go back and loop that action when ever making contact with a wall. well whats happening is that it hits one wall goes to the other and then gets stuck heres a screenshot of the code i am using
You want it to toggle the flip behavior. The “Flip” input will flip the object to make it face the left and the “back” input will flip it back to its original position to the right.
The toggle will automatically switch between both of these whenever the object hits the wall.
yes, ive tried that, if i do that it just gets stuck on the first wall dosnt even flip once
A game link would be really helpful here.
Do you have the collisions set right?
the “arrow” object
Ok, thanks. For starters, you really should use bundles lol. Its kind of hard finding things.
yeah, ive gotten that alot, i just keep forgetting
What general level is the arrow in?
the level with a red background
So first off, are you trying to make an enemy that flip’s when it hits a wall, or follow the player?
both, while idle it will bounce between the walls but when within a certain proximity it will start chasing the player
Oh, yeah. I think @ManiacPumpkin seen something I didn’t. The input needs to be on the “toggle” not the “flip.”
so this works for you, it doesn’t for me
Are you trying to make it so the “arrow” goes around the walls?
no, if the arrow hits the wall while following the player than it will explode
to be honest… just send me the code in text form. select the code and ctrl c, ctrl v
Ok, see if this works.
{"data":{"behavior":{"v":"2","nodes":[{"inputCount":0,"outputCount":0,"name":"Explode","behaviorType":"logic.NodeGroup","x":720,"y":480,"group":"","id":"af7e6845d957684d","isMenuItem":false},{"inputCount":3,"outputCount":3,"name":"Animation","behaviorType":"logic.properties.Animation","x":1080,"y":352,"group":"af7e6845d957684d","id":"322d9d4834e92443","animationName":"explode","priority":0},{"inputCount":0,"outputCount":1,"name":"Collision","behaviorType":"logic.triggers.Collision","x":720,"y":480,"group":"af7e6845d957684d","id":"322e36985356ab44","targetClassId":20543369,"targetEntityId":0,"collisionFilter":15,"collideWithEntity":false,"delay":0},{"inputCount":1,"outputCount":0,"name":"Message","behaviorType":"logic.components.Message","x":1080,"y":480,"group":"af7e6845d957684d","id":"322ea6001a60d644","msg":"hit","route":"SendToSelected","targetClassId":20543369},{"inputCount":3,"outputCount":1,"name":"Switch","behaviorType":"logic.logic.Switch","x":900,"y":352,"group":"af7e6845d957684d","id":"322f9bf0b517ab42","_startVal":1,"dataType":2},{"inputCount":3,"outputCount":1,"name":"Switch","behaviorType":"logic.logic.Switch","x":900,"y":464,"group":"af7e6845d957684d","id":"322f9c90dd796248","_startVal":1,"dataType":2},{"inputCount":1,"outputCount":1,"name":"Destroyer","behaviorType":"logic.components.Destroyer","x":1260,"y":336,"group":"af7e6845d957684d","id":"46c0bf767d761e43"},{"inputCount":0,"outputCount":4,"name":"MouseClick","behaviorType":"logic.triggers.MouseClick","x":720,"y":352,"group":"af7e6845d957684d","id":"4c096770a7a2b042","global":false,"rightClick":false,"skipAlpha":false,"version":2},{"inputCount":0,"outputCount":1,"name":"Collision","behaviorType":"logic.triggers.Collision","x":900,"y":256,"group":"af7e6845d957684d","id":"551420eef3244847","targetClassId":20541662,"targetEntityId":0,"collisionFilter":15,"collideWithEntity":false,"delay":0},{"inputCount":1,"outputCount":0,"name":"Message","behaviorType":"logic.components.Message","x":1080,"y":256,"group":"af7e6845d957684d","id":"55149b509b14b846","msg":"hit","route":"SendToSelected","targetClassId":20541662},{"inputCount":0,"outputCount":1,"name":"Mailbox","behaviorType":"logic.components.Mailbox","x":720,"y":576,"group":"af7e6845d957684d","id":"af7e9317a10d5e40","msg":"Explode"},{"inputCount":0,"outputCount":0,"name":"Follow","behaviorType":"logic.NodeGroup","x":720,"y":400,"group":"","id":"af7ecbec51c1ff49","isMenuItem":false},{"inputCount":2,"outputCount":3,"name":"Proximity","behaviorType":"logic.components.Prox2","x":1440,"y":112,"group":"af7ecbec51c1ff49","id":"3222373a76149f47","targetEntityId":0,"threshold":130,"targetClassId":20543369,"nearestOnly":false,"firstObject":true,"allObjects":false,"contains":false,"shape":0,"oX":0,"oY":0,"pin":false},{"inputCount":0,"outputCount":1,"name":"Always","behaviorType":"logic.triggers.Always","x":1080,"y":144,"group":"af7ecbec51c1ff49","id":"3222c6eaef23a247"},{"inputCount":2,"outputCount":1,"name":"PointAt","behaviorType":"logic.components.PointAt","x":1620,"y":112,"group":"af7ecbec51c1ff49","id":"3222e66b01641841","skipRot":false},{"inputCount":3,"outputCount":1,"name":"Switch","behaviorType":"logic.logic.Switch","x":1260,"y":112,"group":"af7ecbec51c1ff49","id":"3229c3892939f147","_startVal":1,"dataType":2},{"inputCount":3,"outputCount":3,"name":"Velocity","behaviorType":"logic.properties.Physics","x":1800,"y":528,"group":"af7ecbec51c1ff49","id":"322cbfe858b13042"},{"inputCount":0,"outputCount":1,"name":"Always","behaviorType":"logic.triggers.Always","x":1440,"y":544,"group":"af7ecbec51c1ff49","id":"a4b2ed57861d6849"},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":1620,"y":528,"group":"af7ecbec51c1ff49","id":"a4bf22503f447b47","startVal":10,"tag":"","roundMode":1},{"inputCount":0,"outputCount":1,"name":"Collision","behaviorType":"logic.triggers.Collision","x":1440,"y":304,"group":"af7ecbec51c1ff49","id":"af476538b942fd45","notes":"This should really be set to the wall type, or wall parent. ","n_o":1,"targetClassId":0,"targetEntityId":0,"collisionFilter":15,"collideWithEntity":false,"delay":0},{"inputCount":3,"outputCount":3,"name":"Flip","behaviorType":"logic.properties.Flip","x":1800,"y":304,"group":"af7ecbec51c1ff49","id":"af47d7052ec97e4a","spriteOnly":false},{"inputCount":3,"outputCount":1,"name":"Switch","behaviorType":"logic.logic.Switch","x":1620,"y":304,"group":"af7ecbec51c1ff49","id":"af6edb79b1cdf14f","_startVal":1,"dataType":2},{"inputCount":3,"outputCount":1,"name":"Switch","behaviorType":"logic.logic.Switch","x":1620,"y":400,"group":"af7ecbec51c1ff49","id":"af796dac2d2d0447","_startVal":0,"dataType":2},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":1800,"y":400,"group":"af7ecbec51c1ff49","id":"af799a6df3245f4d","startVal":0,"tag":"EXPLODE","roundMode":1},{"inputCount":1,"outputCount":0,"name":"Message","behaviorType":"logic.components.Message","x":1980,"y":400,"group":"af7ecbec51c1ff49","id":"af7f1c3402757046","msg":"Explode","route":"SendToSelf"}],"links":[{"input_id":"46c0bf767d761e43i0","output_id":"322d9d4834e92443o1"},{"input_id":"322f9c90dd796248i2","output_id":"322e36985356ab44o0"},{"input_id":"322d9d4834e92443i0","output_id":"322f9bf0b517ab42o0"},{"input_id":"322d9d4834e92443i0","output_id":"322f9c90dd796248o0"},{"input_id":"322ea6001a60d644i0","output_id":"322f9c90dd796248o0"},{"input_id":"322f9bf0b517ab42i2","output_id":"4c096770a7a2b042o0"},{"input_id":"55149b509b14b846i0","output_id":"551420eef3244847o0"},{"input_id":"322d9d4834e92443i0","output_id":"551420eef3244847o0"},{"input_id":"322f9c90dd796248i2","output_id":"af7e9317a10d5e40o0"},{"input_id":"3222e66b01641841i0","output_id":"3222373a76149f47o0"},{"input_id":"af6edb79b1cdf14fi1","output_id":"3222373a76149f47o0"},{"input_id":"af796dac2d2d0447i1","output_id":"3222373a76149f47o0"},{"input_id":"3222e66b01641841i1","output_id":"3222373a76149f47o1"},{"input_id":"3229c3892939f147i2","output_id":"3222c6eaef23a247o0"},{"input_id":"3222373a76149f47i1","output_id":"3229c3892939f147o0"},{"input_id":"a4bf22503f447b47i1","output_id":"a4b2ed57861d6849o0"},{"input_id":"322cbfe858b13042i2","output_id":"a4bf22503f447b47o0"},{"input_id":"af6edb79b1cdf14fi2","output_id":"af476538b942fd45o0"},{"input_id":"af796dac2d2d0447i2","output_id":"af476538b942fd45o0"},{"input_id":"af47d7052ec97e4ai2","output_id":"af6edb79b1cdf14fo0"},{"input_id":"af799a6df3245f4di1","output_id":"af796dac2d2d0447o0"},{"input_id":"af7f1c3402757046i0","output_id":"af799a6df3245f4do0"}]}}}
nope thats not it…