i am making a game and i need it to where you can throw something but i need it to be in a top down game. can someone make an example?
By throw, do you mean like a gun? Or something with some gravity?
Just use the emit block in the components section. By the way, the object you are trying to throw should be movable and not be affected by gravity.
well i want it to stop after it passes 2 tiles and then i use a whistle to call it back to me
Does this work for you? (Put it in the object being thrown):
{“data”:{“behavior”:{“v”:“2”,“nodes”:[{“delay”:10,“count”:1,“version”:2,“inputCount”:3,“outputCount”:1,“name”:“Timer”,“behaviorType”:“logic.triggers.Timer”,“x”:-90,“y”:-40,“group”:“”,“id”:“4642e7dbf1a8334d”,“notes”:“This is how long it takes for it to stop”,“n_o”:1},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:180,“y”:-24,“group”:“”,“id”:“4642fdcc62e79c41”,“notes”:“This is the speed it is when it stops”,“n_o”:1,“startVal”:0,“tag”:“”,“roundMode”:1},{“inputCount”:3,“outputCount”:3,“name”:“Velocity”,“behaviorType”:“logic.properties.Physics”,“x”:360,“y”:-32,“group”:“”,“id”:“4643192a9e192e4d”},{“inputCount”:0,“outputCount”:2,“name”:“Keyboard”,“behaviorType”:“logic.triggers.Keyboard”,“x”:-90,“y”:-208,“group”:“”,“id”:“46435e4e1571c14b”,“notes”:“This is the keybind for the whistle”,“n_o”:1,“keyCode”:81},{“delay”:0,“count”:0,“version”:2,“inputCount”:3,“outputCount”:1,“name”:“Timer”,“behaviorType”:“logic.triggers.Timer”,“x”:180,“y”:-264,“group”:“”,“id”:“46451d42498e0f4d”},{“inputCount”:2,“outputCount”:3,“name”:“Proximity”,“behaviorType”:“logic.components.Prox2”,“x”:360,“y”:-240,“group”:“”,“id”:“4645571e291ad64e”,“notes”:“This checks the location of the player”,“n_o”:1,“targetEntityId”:0,“threshold”:1000,“targetClassId”:18090945,“nearestOnly”:false,“firstObject”:true,“allObjects”:false,“contains”:false,“shape”:0,“oX”:0,“oY”:0,“pin”:false},{“inputCount”:2,“outputCount”:1,“name”:“PointAt”,“behaviorType”:“logic.components.PointAt”,“x”:540,“y”:-288,“group”:“”,“id”:“4645c09112c66549”,“notes”:“This makes it look towards the player”,“n_o”:1,“skipRot”:false},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:810,“y”:-296,“group”:“”,“id”:“46460a96765adb46”,“notes”:“This is the speed of which it comes back to the player”,“startVal”:2,“tag”:“”,“roundMode”:1}],“links”:[{“input_id”:“4642fdcc62e79c41i1”,“output_id”:“4642e7dbf1a8334do0”},{“input_id”:“4642fdcc62e79c41i1”,“output_id”:“4642e7dbf1a8334do0”},{“input_id”:“4643192a9e192e4di0”,“output_id”:“4642fdcc62e79c41o0”},{“input_id”:“4643192a9e192e4di1”,“output_id”:“4642fdcc62e79c41o0”},{“input_id”:“4643192a9e192e4di2”,“output_id”:“4642fdcc62e79c41o0”},{“input_id”:“4643192a9e192e4di0”,“output_id”:“4642fdcc62e79c41o0”},{“input_id”:“4643192a9e192e4di1”,“output_id”:“4642fdcc62e79c41o0”},{“input_id”:“4643192a9e192e4di2”,“output_id”:“4642fdcc62e79c41o0”},{“input_id”:“4643192a9e192e4di2”,“output_id”:“46460a96765adb46o0”},{“input_id”:“46451d42498e0f4di0”,“output_id”:“46435e4e1571c14bo0”},{“input_id”:“46451d42498e0f4di0”,“output_id”:“46435e4e1571c14bo0”},{“input_id”:“4645571e291ad64ei1”,“output_id”:“46451d42498e0f4do0”},{“input_id”:“4645571e291ad64ei1”,“output_id”:“46451d42498e0f4do0”},{“input_id”:“4645c09112c66549i0”,“output_id”:“4645571e291ad64eo0”},{“input_id”:“4645c09112c66549i1”,“output_id”:“4645571e291ad64eo1”},{“input_id”:“4645c09112c66549i0”,“output_id”:“4645571e291ad64eo0”},{“input_id”:“4645c09112c66549i1”,“output_id”:“4645571e291ad64eo1”},{“input_id”:“46460a96765adb46i1”,“output_id”:“4645c09112c66549o0”},{“input_id”:“46460a96765adb46i1”,“output_id”:“4645c09112c66549o0”},{“input_id”:“4643192a9e192e4di2”,“output_id”:“46460a96765adb46o0”}]}}}
How am i supposed to do that @gamerztrio
copy the text, go into your objects behaviours, click anywhere, select import, paste the text in, and it should work.
i also put the code in this game, you could just copy it: Flowlab Game Creator - stupid experiments
thank you i was also wanting to have a attack and this helped me decide how to do it
my game is this Flowlab Game Creator - Hops: Extreme