Top down animations problem

ok so i have a (left, right, down, and up) animations as you’ll see but when you go diagonal it just starts a animation but doesnt know which one to choose but I just want it to play up or down depending on what way your going diagonal @JR01 @grazer

1 Like

maybe ill have to use a rotate or something

Use and gates to make it detect if you are moving diagonally.

2 Likes

how do you do that?

and logic gates + rotation

1 Like


where would i plug them in?

When 2 inputs are being pressed, it move diagonally, so put them into an and logic gate. Do not use animations. Use rotation.

1 Like

I have an example of this in transmutation. Flowlab Game Creator - Transmutation

1 Like

say i’m going up and right i want it to play the up animation so and so forth

You shouldn’t ever use animations for directions. You should always set rotation.

1 Like

well what if i did what i said i was gonna do but i change the rotation so the animation matches the direction its going

1 Like

That makes no sense, and is a waste of time and can cause many bugs. Instead of giving me dumb arguments because you think your point is better, listen to me, as I am trying to help and you are arguing and declining my help while not even realizing you are.

1 Like

no im not trying to argue but making it rotate isnt what im wanting let me find the game im tryna talk about its like that

{"data":{"behavior":{"v":"2","nodes":[{"inputCount":0,"outputCount":0,"name":"above movement","behaviorType":"logic.NodeGroup","x":-270,"y":-32,"group":"","id":"176e9ac2aa348045","isMenuItem":false},{"inputCount":0,"outputCount":2,"name":"Keyboard","behaviorType":"logic.triggers.Keyboard","x":-270,"y":128,"group":"176e9ac2aa348045","id":"176ff3596cf51d43","keyCode":65,"repeats":true,"delay":0},{"inputCount":0,"outputCount":2,"name":"Keyboard","behaviorType":"logic.triggers.Keyboard","x":-270,"y":32,"group":"176e9ac2aa348045","id":"176ff4afff2b8244","keyCode":68,"repeats":true,"delay":0},{"inputCount":0,"outputCount":2,"name":"Keyboard","behaviorType":"logic.triggers.Keyboard","x":-270,"y":-64,"group":"176e9ac2aa348045","id":"176ff5e3af6fd540","keyCode":87,"repeats":true,"delay":0},{"inputCount":0,"outputCount":2,"name":"Keyboard","behaviorType":"logic.triggers.Keyboard","x":-270,"y":-160,"group":"176e9ac2aa348045","id":"176ff761fb5af549","keyCode":83,"repeats":true,"delay":0},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":-90,"y":128,"group":"176e9ac2aa348045","id":"17703fc3e100da4f","startVal":-8,"tag":"","roundMode":1},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":-90,"y":32,"group":"176e9ac2aa348045","id":"17704049ef533a43","startVal":8,"tag":"","roundMode":1},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":-90,"y":-64,"group":"176e9ac2aa348045","id":"177040e7550aa945","startVal":-8,"tag":"","roundMode":1},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":-90,"y":-160,"group":"176e9ac2aa348045","id":"177044225a173745","startVal":8,"tag":"","roundMode":1},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":-90,"y":224,"group":"176e9ac2aa348045","id":"1770da37cbb6d547","startVal":0,"roundMode":1},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":-90,"y":-256,"group":"176e9ac2aa348045","id":"1770db9e0f879745","startVal":0,"roundMode":1},{"inputCount":3,"outputCount":3,"name":"Velocity","behaviorType":"logic.properties.Physics","x":180,"y":0,"group":"176e9ac2aa348045","id":"17713e2cc7cadc4d"},{"inputCount":0,"outputCount":2,"name":"Keyboard","behaviorType":"logic.triggers.Keyboard","x":-270,"y":128,"group":"177806c91bd12741","id":"1778189ae748794b","keyCode":65,"repeats":true,"delay":0},{"inputCount":0,"outputCount":2,"name":"Keyboard","behaviorType":"logic.triggers.Keyboard","x":-270,"y":32,"group":"177806c91bd12741","id":"1778189a927e0d45","keyCode":68,"repeats":true,"delay":0},{"inputCount":0,"outputCount":2,"name":"Keyboard","behaviorType":"logic.triggers.Keyboard","x":-270,"y":-64,"group":"177806c91bd12741","id":"1778189a62ff4342","keyCode":87,"repeats":true,"delay":0},{"inputCount":0,"outputCount":2,"name":"Keyboard","behaviorType":"logic.triggers.Keyboard","x":-270,"y":-160,"group":"177806c91bd12741","id":"1778189a9fe5584f","keyCode":83,"repeats":true,"delay":0},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":0,"y":32,"group":"177806c91bd12741","id":"179f4790c6313c44","startVal":0,"roundMode":1},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":0,"y":-64,"group":"177806c91bd12741","id":"179f481b4c01b54c","startVal":270,"tag":"","roundMode":1},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":0,"y":-160,"group":"177806c91bd12741","id":"179f494d052a7040","startVal":90,"tag":"","roundMode":1},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":0,"y":128,"group":"177806c91bd12741","id":"179f5be122583f42","startVal":180,"tag":"","roundMode":1},{"inputCount":2,"outputCount":2,"name":"Rotation","behaviorType":"logic.properties.Rotation","x":450,"y":96,"group":"177806c91bd12741","id":"179ffd1d4ffefb4c"},{"inputCount":2,"outputCount":1,"name":"Logic Gate","behaviorType":"logic.logic.Gate","x":0,"y":224,"group":"177806c91bd12741","id":"17a1763190cab843","gateType":"AND"},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":180,"y":224,"group":"177806c91bd12741","id":"17a1ead466c44344","startVal":225,"tag":"","roundMode":1},{"inputCount":2,"outputCount":1,"name":"Logic Gate","behaviorType":"logic.logic.Gate","x":0,"y":320,"group":"177806c91bd12741","id":"17a2759e56c97546","gateType":"AND"},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":180,"y":320,"group":"177806c91bd12741","id":"17a2759eac1c284f","startVal":45,"tag":"","roundMode":1},{"inputCount":2,"outputCount":1,"name":"Logic Gate","behaviorType":"logic.logic.Gate","x":0,"y":448,"group":"177806c91bd12741","id":"17a2ab83c06c6140","gateType":"AND"},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":180,"y":448,"group":"177806c91bd12741","id":"17a2ab83b7298a47","startVal":315,"tag":"","roundMode":1},{"inputCount":2,"outputCount":1,"name":"Logic Gate","behaviorType":"logic.logic.Gate","x":0,"y":576,"group":"177806c91bd12741","id":"17a2ab832bafb948","gateType":"AND"},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":180,"y":576,"group":"177806c91bd12741","id":"17a2ab84438db746","startVal":135,"tag":"","roundMode":1},{"inputCount":0,"outputCount":0,"name":"rotation","behaviorType":"logic.NodeGroup","x":-270,"y":352,"group":"176e9ac2aa348045","id":"177806c91bd12741","isMenuItem":false},{"inputCount":3,"outputCount":2,"name":"Animation","behaviorType":"logic.properties.Animation","x":180,"y":-224,"group":"176e9ac2aa348045","id":"17a044fb4a2ef74a","animationName":"move","loop":true,"priority":0},{"inputCount":3,"outputCount":2,"name":"Animation","behaviorType":"logic.properties.Animation","x":180,"y":128,"group":"176e9ac2aa348045","id":"17a0a56316e65f4d","animationName":"move","loop":true,"priority":0}],"links":[{"input_id":"17a0a56316e65f4di0","output_id":"176ff3596cf51d43o0"},{"input_id":"17703fc3e100da4fi1","output_id":"176ff3596cf51d43o0"},{"input_id":"17a0a56316e65f4di1","output_id":"176ff3596cf51d43o1"},{"input_id":"1770da37cbb6d547i1","output_id":"176ff3596cf51d43o1"},{"input_id":"17704049ef533a43i1","output_id":"176ff4afff2b8244o0"},{"input_id":"17a0a56316e65f4di0","output_id":"176ff4afff2b8244o0"},{"input_id":"17a0a56316e65f4di1","output_id":"176ff4afff2b8244o1"},{"input_id":"1770da37cbb6d547i1","output_id":"176ff4afff2b8244o1"},{"input_id":"17a044fb4a2ef74ai0","output_id":"176ff5e3af6fd540o0"},{"input_id":"177040e7550aa945i1","output_id":"176ff5e3af6fd540o0"},{"input_id":"1770db9e0f879745i1","output_id":"176ff5e3af6fd540o1"},{"input_id":"17a044fb4a2ef74ai1","output_id":"176ff5e3af6fd540o1"},{"input_id":"17a044fb4a2ef74ai0","output_id":"176ff761fb5af549o0"},{"input_id":"177044225a173745i1","output_id":"176ff761fb5af549o0"},{"input_id":"1770db9e0f879745i1","output_id":"176ff761fb5af549o1"},{"input_id":"17a044fb4a2ef74ai1","output_id":"176ff761fb5af549o1"},{"input_id":"17713e2cc7cadc4di0","output_id":"17703fc3e100da4fo0"},{"input_id":"17713e2cc7cadc4di0","output_id":"17704049ef533a43o0"},{"input_id":"17713e2cc7cadc4di1","output_id":"177040e7550aa945o0"},{"input_id":"17713e2cc7cadc4di1","output_id":"177044225a173745o0"},{"input_id":"17713e2cc7cadc4di0","output_id":"1770da37cbb6d547o0"},{"input_id":"17713e2cc7cadc4di1","output_id":"1770db9e0f879745o0"},{"input_id":"179f5be122583f42i1","output_id":"1778189ae748794bo0"},{"input_id":"17a1763190cab843i1","output_id":"1778189ae748794bo0"},{"input_id":"17a2ab832bafb948i0","output_id":"1778189ae748794bo0"},{"input_id":"179f4790c6313c44i1","output_id":"1778189a927e0d45o0"},{"input_id":"17a2759e56c97546i0","output_id":"1778189a927e0d45o0"},{"input_id":"17a2ab83c06c6140i1","output_id":"1778189a927e0d45o0"},{"input_id":"179f481b4c01b54ci1","output_id":"1778189a62ff4342o0"},{"input_id":"17a1763190cab843i0","output_id":"1778189a62ff4342o0"},{"input_id":"17a2ab83c06c6140i0","output_id":"1778189a62ff4342o0"},{"input_id":"179f494d052a7040i1","output_id":"1778189a9fe5584fo0"},{"input_id":"17a2759e56c97546i1","output_id":"1778189a9fe5584fo0"},{"input_id":"17a2ab832bafb948i1","output_id":"1778189a9fe5584fo0"},{"input_id":"179ffd1d4ffefb4ci0","output_id":"179f4790c6313c44o0"},{"input_id":"179ffd1d4ffefb4ci0","output_id":"179f481b4c01b54co0"},{"input_id":"179ffd1d4ffefb4ci0","output_id":"179f494d052a7040o0"},{"input_id":"179ffd1d4ffefb4ci0","output_id":"179f5be122583f42o0"},{"input_id":"17a1ead466c44344i1","output_id":"17a1763190cab843o0"},{"input_id":"179ffd1d4ffefb4ci0","output_id":"17a1ead466c44344o0"},{"input_id":"17a2759eac1c284fi1","output_id":"17a2759e56c97546o0"},{"input_id":"179ffd1d4ffefb4ci0","output_id":"17a2759eac1c284fo0"},{"input_id":"17a2ab83b7298a47i1","output_id":"17a2ab83c06c6140o0"},{"input_id":"179ffd1d4ffefb4ci0","output_id":"17a2ab83b7298a47o0"},{"input_id":"17a2ab84438db746i1","output_id":"17a2ab832bafb948o0"},{"input_id":"179ffd1d4ffefb4ci0","output_id":"17a2ab84438db746o0"}]}}}
1 Like

The up down code with rotations in diagonal directions.

1 Like

ok thx for your help
EDIT: the thing isn’t that I don’t wanna use your example its the fact that I don’t wanna use rotations ill probably use this for something else tho

If you use animations you won’t be able to represent diagonal rotations. Please listen to me: if you use animations, you are wasting time, making the animation choppy, and making the game more complex for no reason.

1 Like

im not wasting time and besides its not main priority right now and your example is more complicated because it adds rotations my way is the normal animations but when you go diagonal down then it plays down animation and if your going diagonal up it plays up animation

i just need to figure out how to make that happen @JR01 any ideas?

Then use an and logic gate to sort it to up or down! like i said originally.

1 Like