“Create Projectiles” occupies the “entities count” forever

Projectiles created by “Create Projectiles” will invisibly exist forever if the owner player leaves the game before the projectile is destroyed or hits the target. The projectiles will be invisible and untouchable but occupying “entities count” forever, and cannot be destroyed by “destroy effect”.

I can’t recreate that bug, it seeems to work as intended, the projectiles automatically deallocate themselves if the owner leaves or lifetime which you set at creating the projectiles expire, and do not occupy Entities Count.

Thank you for your reply.
But the bug is still in the “Practice Range”.
If you create projectiles at your position.
And then move yourself into the spectator slot.
You will found the projectiles will occupy the entity count forever.
The code is:

settings
{
modes
{

	Practice Range
	{
		Hero Limit: Off
	}
}

}

rule(“Rule 1”)
{
event
{
Ongoing - Global;
}

actions
{
	Create HUD Text(All Players(All Teams), Entity Count, Null, Null, Left, 0, Color(White), Color(White), Color(White),
		Visible To and String, Default Visibility);
}

}

rule(“Rule 2”)
{
event
{
Ongoing - Each Player;
All;
All;
}

conditions
{
	Slot Of(Event Player) < 6;
	Hero Of(Event Player) != Hero(Tracer);
}

actions
{
	Create Projectile(Orb Projectile, Event Player, Null, Null, To World, Damage, All Teams, 50, 1, 0, Bad Explosion, Explosion Sound,
		0, 10, 5, 0, 0, 0);
	Wait(0.250, Ignore Condition);
	Loop If Condition Is True;
}

}


Besides, if you run this code.
The 12 dummy bots will create massive ghost projectiles, and the entity count will immediately reach the maximum of 128.
Then no any projectiles and effects can be created.

Code:

settings
{
modes
{
disabled Capture the Flag
{
Flag Dropped Lock Time: 5.0
Flag Return Time: 4.0
Flag Score Respawn Time: 15.0
}

	disabled Practice Range
	{
		Hero Limit: Off
	}

	Skirmish
	{
		enabled maps
		{
			Workshop Chamber 972777519512064577
		}
	}
}

}

rule(“Rule 1”)
{
event
{
Ongoing - Global;
}

actions
{
	Create HUD Text(All Players(All Teams), Entity Count, Null, Null, Left, 0, Color(White), Color(White), Color(White),
		Visible To and String, Default Visibility);
}

}

rule(“Rule 2”)
{
event
{
Ongoing - Each Player;
All;
All;
}

actions
{
	Create Projectile(Orb Projectile, Event Player, Null, Null, To World, Damage, All Teams, 50, 1, 0, Bad Explosion, Explosion Sound,
		0, 10, 5, 0, 0, 0);
	Wait(0.250, Ignore Condition);
	Loop If Condition Is True;
}

}

rule(“Rule 3”)
{
event
{
Ongoing - Global;
}

actions
{
	For Global Variable(A, 0, 6, 1);
		If(!Entity Exists(Players In Slot(Global.A, Team 1)));
			Create Dummy Bot(Hero(Ana), Team 1, -1, Random Value In Array(Spawn Points(Team 1)), Up);
		End;
		If(!Entity Exists(Players In Slot(Global.A, Team 2)));
			Create Dummy Bot(Hero(Ana), Team 2, -1, Random Value In Array(Spawn Points(All Teams)), Up);
		End;
	End;
	Wait(0.020, Ignore Condition);
	Set Facing(All Players(All Teams), Up, To World);
	Wait(10, Ignore Condition);
	Destroy All Dummy Bots;
	Wait(1, Ignore Condition);
	Loop If Condition Is True;
}

}

Well the Pratice Range is another case, Pratice Range have other conditions then core modes, the workshop was intended to utilizise the core modes with script functionality, the Pratice Range is not suited for more then it meant to be used for. Test it in regular modes and you’ll see no issues.

The bug issue is also in other modes and other maps either.

I shared a mode code: 7S1V1 to show the bug, for your convenience of testing.

I tested it on many maps, such as “Route 66”, “Lijiang Tower”, “Rialto”, “Colosseo”, “Nepal” and “Oasis”. They all show the same bug issues of the ghost projectile.

The bug list:

  1. Creating an AI bot and creating projectiles belonging to it, then removing the bot from the game before the projectiles disappear will cause ghost projectiles.
  2. Creating a dummy bot and doing the same thing as above will cause ghost projectiles.
  3. Creating projectiles belonging to players, and then moving players into spectator slots will cause ghost projectiles.

In the code I shared, every dummy bot creates several projectiles, and then the bots are destroyed before the projectiles expire. Then you will find the entity count gradually increases to the maximum of 128. Finally, you cannot create any effects in the game.

It’s very obvious.

Please import the mode code 7S1V1 I shared, and test it in the game.
Thank you for your patience on this issue.

This issue really hinder the creativity of workshop. Authors can produce much more awesome works if the ghost projectile bug is fixed.

I can now approve this bug by re-testing and given the description of yours. If at any time a player leaves or swaps around, and that player owns a projectile, that projectile becomes a ghost entity before it’s lifetime expires or doesn’t deallocate at all after the owner is not captured anymore (e.g. by leaving or swap to spectator), this causes the projectile to occupy the Entity Count which is globally (server side) handelled, until the match ends. This restricts the creativity and growth of a workshop mode, due the max entity count of 128 or 256 (if workshop extention is used) is fastly reached causing the workshop to not allow any further creation of other effects. I recommend to post that bug in the Bug Report section. Recommended workarounds until this bug is fixed are:

  • Set Player argument to Null, Start Position and Direction arguments need to be set to any Vector other than Null, this allows the projectiles to deallocate properly, but you might discard the functionallity to exactly determine the attacker and owner of the projectile in diverse context cause the owner becomes Null.

  • Beg your players to not leave, inform the hosters and players to not swap around when either Create Projectile or Create Homing Projectile are used in your mode.

  • Use Create Projectile Effect instead, since you can destroy these with Destroy All Effects action and use your own algorithmns for projectile movement and collision detection.

3 Likes

I remember this bug, i mentioned some years ago while i was implementing an mei tower defense. Also after certain amount of projectiles spawned, the game don’t spawn they anymore, even if we invoke the action to delete all entities, don’t works, the projectiles stop spawning.

1 Like