The Bimpball [Updated 11-6-21]

Post your example zscripts/ACS scripts/etc here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
Hey Doomer
Posts: 283
Joined: Sat Sep 25, 2021 3:38 am

The Bimpball [Updated 11-6-21]

Post by Hey Doomer »

As difficulty increases it's possible to alter attacks, so I experimented with this idea. The idea is as an Imp gets more aggressive he throws deadlier fireballs with a trail of smoke and particles that deal more damage.

First there's a tiny ACS script to return the current skill level:

Code: Select all

#library "gameskill"
#include "zcommon.acs"

script "getskill" (void)
{
    SetResultValue(GameSkill());
}
Then DECORATE defines the modified DoomImpBall (decal optional):

Code: Select all

// modify DoomImpBall using BaronBall


Actor BimpBall: DoomImpBall Replaces DoomImpBall
{
	var int user_dam;
	Translation "112:124=169:190"
	+BRIGHT
	+RIPPER
	+DONTHARMCLASS
	+DONTHARMSPECIES
	Decal "Scorch"
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("getskill",0,0,0,0) > 2, "SpawnBimp")
		TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("getskill",0,0,0,0) == 2 && Random(0,1) == 0, "SpawnBimp")
		Goto Super::Spawn
	SpawnBimp:
		TNT1 A 0
		{
			A_ScaleVelocity(1.5);
			A_SetScale(0.8);
			user_dam = 75;
		}
		Goto Bimp
	Bimp:
		BAL7 AB 1
		{
			A_StartSound("fireball", 120, CHANF_OVERLAP);
			A_SpawnItemEx("GrenadeSmokeTrail", 0, 0, Random(-2, 2));
			user_dam--;
			A_SpawnParticle("Red", SPF_FULLBRIGHT | SPF_RELATIVE, Random(1,3) * 35, Random(1,3), 0, Random(-8, 8), Random(-8, 8), Random(2, 6), Random(2, 6), 0.5);
			A_SpawnParticle("Red", SPF_FULLBRIGHT | SPF_RELATIVE, Random(1,3) * 35, Random(1,3), 0, Random(-8, 8), Random(-8, 8), Random(2, 6), Random(2, 6), 0.5);
			A_SpawnParticle("Red", SPF_FULLBRIGHT | SPF_RELATIVE, Random(1,3) * 35, Random(1,3), 0, Random(-8, 8), Random(-8, 8), Random(2, 6), Random(2, 6), 0.5);
			A_SpawnParticle("Red", SPF_FULLBRIGHT | SPF_RELATIVE, Random(1,3) * 35, Random(1,3), 0, Random(-8, 8), Random(-8, 8), Random(2, 6), Random(2, 6), 0.5);
		}
		Loop
	Death:
		TNT1 A 0
		TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("getskill",0,0,0,0) > 2, "DeathBimp")
		Goto Super::Death
	DeathBimp:
		TNT1 A 0 A_StartSound("blast", 121, CHANF_OVERLAP)
		BAL7 CDE 8 A_Explode(user_dam + Random(0, 25), Random(64, 128), XF_THRUSTZ)
		TNT1 A 0 A_Quake(4,12,0,400)
		TNT1 A 0 A_SpawnItem("RocketSmokeTrail")
		Stop
	}
}
Imps throws wimpy fireballs until level 2, when bimpballs and randomly thrown. Above 2 everything thrown is a bimpball (a translated Baron ball). Blast damage decreases with distance. I suppose a bimpball could be thrown by an imp for tactical reasons, such as distance, amount of damage taken, player or imp health, or resource conservation. An idea.

Update
Spoiler:

Return to “Script Library”