Need help with a dash

i need to make a dash for my game that tps a character a few blocks forward like a flashstep any ideas?

Make it so when you press a button it increases or decreases the position of the object accordingly.

You might have to make a router that makes it add or subtract based off the direction your facing.

It is easier than it seems.
You can do this in a ‘Run and Jump’ bundle, by doing this.


(The 10 is the dash force. The 6 is the normal walk force. )

{"data":{"behavior":{"v":"2","nodes":[{"inputCount":2,"outputCount":0,"name":"Run & Jump","behaviorType":"logic.NodeGroup","x":270,"y":-352,"group":0,"id":"14f326fe041d974a","notes":null,"n_o":0,"isMenuItem":false},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":180,"y":-32,"group":"14f326fe041d974a","id":"14f326ffa36ba540","startVal":-6,"tag":"move left"},{"inputCount":3,"outputCount":3,"name":"Velocity","behaviorType":"logic.properties.Physics","x":360,"y":96,"group":"14f326fe041d974a","id":"14f327008e0b2443"},{"inputCount":3,"outputCount":3,"name":"Flip","behaviorType":"logic.properties.Flip","x":360,"y":-32,"group":"14f326fe041d974a","id":"14f3270179ca2a46","vertical":false},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":180,"y":96,"group":"14f326fe041d974a","id":"14f32701af6c7c40","startVal":6,"tag":"move right"},{"inputCount":0,"outputCount":2,"name":"Keyboard","behaviorType":"logic.triggers.Keyboard","x":0,"y":320,"group":"14f326fe041d974a","id":"14f32702acd4b340","keyCode":38,"repeats":false,"delay":0},{"inputCount":0,"outputCount":2,"name":"Keyboard","behaviorType":"logic.triggers.Keyboard","x":0,"y":96,"group":"14f326fe041d974a","id":"14f327020fea2b4b","keyCode":39,"repeats":true,"delay":0},{"inputCount":0,"outputCount":2,"name":"Keyboard","behaviorType":"logic.triggers.Keyboard","x":0,"y":-32,"group":"14f326fe041d974a","id":"14f32702dcad4249","keyCode":37,"repeats":true,"delay":0},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":180,"y":320,"group":"14f326fe041d974a","id":"14f32703ea1ee14e","startVal":12,"tag":"jump force"},{"inputCount":0,"outputCount":1,"name":"Collision","behaviorType":"logic.triggers.Collision","x":180,"y":224,"group":"14f326fe041d974a","id":"14f32706d1f17243","targetClassId":0,"targetEntityId":0,"collisionFilter":15,"collideWithEntity":false},{"inputCount":3,"outputCount":1,"name":"Switch","behaviorType":"logic.logic.Switch","x":360,"y":224,"group":"14f326fe041d974a","id":"14f327067020d842","_startVal":0,"dataType":2},{"inputCount":3,"outputCount":3,"name":"Impulse","behaviorType":"logic.components.Impulse","x":540,"y":224,"group":"14f326fe041d974a","id":"14f3270772bc4e40"},{"inputCount":0,"outputCount":1,"name":"Bundle Input","behaviorType":"logic.NodeGroupInput","x":-360,"y":16,"group":"14f326fe041d974a","id":"14f32707f69d5f40","portId":"14f326fe041d974ai0","tag":"Start","dataType":2},{"inputCount":0,"outputCount":1,"name":"Bundle Input","behaviorType":"logic.NodeGroupInput","x":-360,"y":112,"group":"14f326fe041d974a","id":"14f327083e42cc4b","portId":"14f326fe041d974ai1","tag":"Stop","dataType":2},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":-180,"y":-16,"group":"14f326fe041d974a","id":"14f32708cf7c104c","startVal":10,"tag":"","roundMode":1},{"expression":"A*-1","default0":0,"default1":0,"default2":0,"default3":0,"default4":0,"default5":0,"params":1,"version":2,"tag":"","inputCount":2,"outputCount":1,"name":"Expression","behaviorType":"logic.logic.Expression","x":0,"y":-128,"group":"14f326fe041d974a","id":"14f327106c1fe241"},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":-180,"y":80,"group":"14f326fe041d974a","id":"14f3271009fad640","startVal":6,"tag":"","roundMode":1}],"links":[{"input_id":"14f3270179ca2a46i0","output_id":"14f326ffa36ba540o0"},{"input_id":"14f327008e0b2443i0","output_id":"14f326ffa36ba540o0"},{"input_id":"14f3270179ca2a46i1","output_id":"14f32701af6c7c40o0"},{"input_id":"14f327008e0b2443i0","output_id":"14f32701af6c7c40o0"},{"input_id":"14f32703ea1ee14ei1","output_id":"14f32702acd4b340o0"},{"input_id":"14f32701af6c7c40i1","output_id":"14f327020fea2b4bo0"},{"input_id":"14f326ffa36ba540i1","output_id":"14f32702dcad4249o0"},{"input_id":"14f327067020d842i2","output_id":"14f32703ea1ee14eo0"},{"input_id":"14f327067020d842i1","output_id":"14f32706d1f17243o0"},{"input_id":"14f327067020d842i0","output_id":"14f327067020d842o0"},{"input_id":"14f3270772bc4e40i1","output_id":"14f327067020d842o0"},{"input_id":"14f32708cf7c104ci1","output_id":"14f32707f69d5f40o0"},{"input_id":"14f3271009fad640i1","output_id":"14f327083e42cc4bo0"},{"input_id":"14f327106c1fe241i0","output_id":"14f32708cf7c104co0"},{"input_id":"14f327106c1fe241i1","output_id":"14f32708cf7c104co0"},{"input_id":"14f32701af6c7c40i0","output_id":"14f32708cf7c104co0"},{"input_id":"14f326ffa36ba540i0","output_id":"14f327106c1fe241o0"},{"input_id":"14f327106c1fe241i0","output_id":"14f3271009fad640o0"},{"input_id":"14f327106c1fe241i1","output_id":"14f3271009fad640o0"},{"input_id":"14f32701af6c7c40i0","output_id":"14f3271009fad640o0"}]}}}

Looking at that code it looks more like something for hold a button for sprint. The dash I think they’re talking about is the one that boosts you forward and keeps you in the air.

2 Likes

Oh, sorry. I thought he was referencing sprint. You could use a impulse for a dash?

Yes but the Player would still have gravity and wouldn’t stay in the air. I suggest having the Player constantly checking it’s Y position and then have it keep it’s Y pos when the dash is activated.

1 Like

personally I’d make the player teleport forward slightly with a following trail to make an illusion of dashing, like I did once on my now deleted account.

2 Likes

I did that too before, but then I got too lazy to figure out how to stop the player from dashing through walls.

same, i just put spikes behind the object that you aren’t supposed to dash through, because part of the game was about dashing through walls.

1 Like