Help with Free Fly code

So I was wondering if it would be possible to create a gamemode where everyone is flying. Is it possible to recreate a flying code akin to the way Echo or Mercy flies? Or is it only possible to go up/down?

It is impossible because it would need special coding, sound effects + animations and the workshop doesnt have that though the sound effects from the workshop are nothing you are looking for.

To my knowledge, i believe that it is possible to go up/down/sideways/backwards/forwards.
Though i do believe it is possible to let them fly, but im 100% right about noone able to recreate mercy or echos flight thing.

I’m not looking for these, all I want is the basic movement code.

1 Like

So you’re looking just for the Ability to fly as any Hero if I get this right.

rule("Toggle Fly")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Is Button Held(Event Player, Button(Interact)) == True;
	}

	actions
	{
		If(Event Player.F);
			Set Gravity(Event Player, 0);
			Start Accelerating(Event Player, Up, Is Button Held(Event Player, Button(Jump)) ? 110 : 100, 25, To World,
				Direction Rate and Max Speed);
			Start Accelerating(Event Player, Down, Is Button Held(Event Player, Button(Crouch)) ? 110 : 100, Is Button Held(Event Player,
				Button(Crouch)) ? 25 : 2.500, To World, Direction Rate and Max Speed);
			Event Player.F = True;
		Else;
			Set Gravity(Event Player, 100);
			Stop Accelerating(Event Player);
			Event Player.F = False;
		End;
	}
}

rule("Levitation Up Halt")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Event Player.F == True;
		Is Alive(Event Player) == True;
		Is Button Held(Event Player, Button(Jump)) != True;
		Vertical Speed Of(Event Player) > Null;
	}

	actions
	{
		Apply Impulse(Event Player, Down, Vertical Speed Of(Event Player), To World, Incorporate Contrary Motion);
	}
}
3 Likes

Thanks for that.

Question: is your code just up/down, or is that a free fly? Can you fly side/side the same way you could with echo or mercy, or is it more of a Pharah-style flight?

Free flight without Fuel, Infinite Echo Ability / Mercy Ultimate.
And if you’ll copy the Rules you’ll need to change the "
The Forums actually use unicode ones which the Workshop doesnt understand.

1 Like