Back to home

Lucio Instagib

0S0AJ
click to copy
This game is archived.
If you with to unarchive it, click the "restore" button in the options menu.

Category:
Custom game mode

Author:
Bored

Rating:
1

Version:
0.1.0

Posted:
2 days ago

Last updated:
2 days ago

Tags:
lucio instagib railgun

Project Links

Share this workshop!

Options

What is instagib? Instagib is an old game mode from the days of Quake and Unreal Tournament where every player has a one hit kill railgun. It's fast, it's fun, and it's insanely hard.

Discord

settings
{
	main
	{
		Description: "Lucio Instagib\n\nShare Code: 0S0AJ\nCreator(s): Bored\nDiscord: https://discord.gg/UCQTE2R\n\nWhat is instagib? Instagib is an old game mode from the days of Quake and Unreal Tournament where every player has a one hit kill railgun. It's fast, it's fun, and it's insanely hard."
	}

	lobby
	{
		Max Spectators: 12
	}

	modes
	{
		Capture the Flag
		{
			Flag Carrier Abilities: All
			Flag Dropped Lock Time: 0.0
			Flag Return Time: 0.0
			Flag Score Respawn Time: 0.0
			Respawn Speed Buff Duration: 5.0
			Score To Win: 5
			Team Needs Flag At Base To Score: On
		}

		Control

		Deathmatch
		{
			Score To Win: 50
		}

		Elimination
		{
			Reveal Heroes: On
			Reveal Heroes After Match Time Elapsed: 0
			Score To Win: 5
		}

		Team Deathmatch
		{
			Score To Win: 100
		}

		General
		{
			Allow Hero Switching: Off
			Enemy Health Bars: Off
			Hero Limit: Off
			Respawn As Random Hero: On
			Respawn Time Scalar: 25%
			Spawn Health Packs: Disabled
		}
	}

	heroes
	{
		General
		{
			Damage Dealt: 10%
			Damage Received: 10%
			Health: 10%
			No Ammunition Requirement: On
			Primary Fire: Off
			Ultimate Ability: Off

			LĂșcio
			{
				Crossfade: Off
			}

			enabled heroes
			{
				LĂșcio
			}
		}
	}
}

variables
{
	global:
		0: ShotDelay
		1: MaxShotDistance
		2: ShotEffectDuration
		3: FreindlyFire
		4: RailImpulse
		5: FriendlyRailImpulse

	player:
		0: ShotDelay
		1: ShotEffects
		2: ShotHitLocation
		3: ShotHitPlayer
		4: ShotEndPoint
		5: AdOn
}

subroutines
{
	0: Shoot
	1: ClearShotEffects
	2: HandlePlayerHit
	3: CreateShotEffect
	4: DeferredClearShotEffects
}

rule("Settings (EDIT HERE)")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Global.ShotDelay = 1;
		Global.FreindlyFire = 0;
		Global.RailImpulse = 1000;
		Global.FriendlyRailImpulse = 1;
	}
}

rule("Global Setup")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Global.MaxShotDistance = 1000;
		Global.ShotEffectDuration = 0.175;
	}
}

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

	actions
	{
		Event Player.ShotDelay = 0;
		Event Player.ShotEffects = Empty Array;
		Event Player.AdOn = True;
	}
}

rule("Ad HUD")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	actions
	{
		Create HUD Text(Event Player.AdOn ? Event Player : Null, Custom String("Share: 0S0AJ"), Custom String(
			"Version 0.1.0\nCreated by Bored\nhttps://discord.gg/UCQTE2R\nPress {0} to toggle info", Button(Interact)), Null, Left, 0,
			White, White, White, Visible To, Default Visibility);
	}
}

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

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

	actions
	{
		Event Player.AdOn = !Event Player.AdOn;
	}
}

rule("Skip Aseembling Heroes")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Assembling Heroes == True;
	}

	actions
	{
		Set Match Time(0);
	}
}

rule("Enforce Invincible Player")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Has Status(Event Player, Invincible) == False;
	}

	actions
	{
		"We make players invincible so that we can only damage them with kill command."
		Set Status(Event Player, Null, Invincible, 9999);
	}
}

rule("Player Died")
{
	event
	{
		Player Died;
		All;
		All;
	}

	actions
	{
		Event Player.ShotDelay = 0;
	}
}

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

	conditions
	{
		Is Button Held(Event Player, Primary Fire) == True;
		Event Player.ShotDelay == 0;
		Is Alive(Event Player) == True;
	}

	actions
	{
		Call Subroutine(Shoot);
	}
}

rule("Shoot (Subroutine)")
{
	event
	{
		Subroutine;
		Shoot;
	}

	actions
	{
		Event Player.ShotDelay = Global.ShotDelay;
		Chase Player Variable At Rate(Event Player, ShotDelay, 0, 1, Destination and Rate);
		Event Player.ShotEndPoint = Eye Position(Event Player)   Global.MaxShotDistance * Facing Direction Of(Event Player);
		Event Player.ShotHitLocation = Ray Cast Hit Position(Eye Position(Event Player), Event Player.ShotEndPoint, All Players(All Teams),
			Event Player, True);
		Event Player.ShotHitPlayer = Ray Cast Hit Player(Eye Position(Event Player), Event Player.ShotEndPoint, All Players(All Teams),
			Event Player, True);
		Call Subroutine(ClearShotEffects);
		Call Subroutine(HandlePlayerHit);
		Call Subroutine(CreateShotEffect);
	}
}

rule("Handle Player Hit (Subroutine)")
{
	event
	{
		Subroutine;
		HandlePlayerHit;
	}

	actions
	{
		If(Event Player.ShotHitPlayer);
			If(Team Of(Event Player) == All Teams || Team Of(Event Player) != Team Of(Event Player.ShotHitPlayer));
				Kill(Event Player.ShotHitPlayer, Event Player);
				Apply Impulse(Event Player.ShotHitPlayer, Facing Direction Of(Event Player), Global.RailImpulse, To World,
					Incorporate Contrary Motion);
			Else;
				Apply Impulse(Event Player.ShotHitPlayer, Facing Direction Of(Event Player), Global.RailImpulse * Global.FriendlyRailImpulse,
					To World, Incorporate Contrary Motion);
			End;
		End;
	}
}

rule("Create Shot Effect (Subroutine)")
{
	event
	{
		Subroutine;
		CreateShotEffect;
	}

	actions
	{
		Play Effect(All Players(All Teams), Explosion Sound, White, Eye Position(Event Player), 200);
		If(Team Of(Event Player) == Team 1);
			Create Beam Effect(All Players(All Teams), Bad Beam, Eye Position(Event Player), Event Player.ShotHitLocation, Team 1, None);
			Modify Player Variable(Event Player, ShotEffects, Append To Array, Last Created Entity);
		Else If(Team Of(Event Player) == Team 2);
			Create Beam Effect(All Players(All Teams), Bad Beam, Eye Position(Event Player), Event Player.ShotHitLocation, Team 2, None);
			Modify Player Variable(Event Player, ShotEffects, Append To Array, Last Created Entity);
		Else;
			Create Beam Effect(Remove From Array(All Players(All Teams), Event Player), Bad Beam, Eye Position(Event Player),
				Event Player.ShotHitLocation, Red, None);
			Modify Player Variable(Event Player, ShotEffects, Append To Array, Last Created Entity);
			Create Beam Effect(Event Player, Bad Beam, Eye Position(Event Player), Event Player.ShotHitLocation, Blue, None);
			Modify Player Variable(Event Player, ShotEffects, Append To Array, Last Created Entity);
		End;
		Start Rule(DeferredClearShotEffects, Restart Rule);
	}
}

rule("Clear Shot Effects (Subroutine)")
{
	event
	{
		Subroutine;
		ClearShotEffects;
	}

	actions
	{
		For Global Variable(I, 0, Count Of(Event Player.ShotEffects), 1);
			Destroy Effect(Event Player.ShotEffects[Global.I]);
		End;
		Event Player.ShotEffects = Empty Array;
	}
}

rule("Deferred Clear Shot Effects (Subroutine)")
{
	event
	{
		Subroutine;
		DeferredClearShotEffects;
	}

	actions
	{
		Wait(Global.ShotEffectDuration, Ignore Condition);
		Call Subroutine(ClearShotEffects);
	}
}