I've tried a few things, but my ZScript isn't quite there yet. Still very much a learning-as-I-go thing for me.
Here's what I have so far. I've omitted the Rocket and its trail's code, since there's nothing there that's relevant, it's just changing some sizes and values of the original rocket.
This doesn't work, well, the monster works, but the rocket shells don't die when the spider does. If anyone has suggestions, please, let me know. I've been at this a good while already, and not had a lot of luck.
Code: Select all
class MMArachnotron : Arachnotron
{
Default
{
//$Category Custom Monsters
//$Title Arachnotron (Micro-Missile)
Health 500;
Radius 64;
Height 64;
Mass 600;
Speed 12;
PainChance 128;
Monster;
SeeSound "baby/sight";
PainSound "baby/pain";
DeathSound "baby/death";
ActiveSound "baby/active";
Obituary "$OB_BABY";
Tag "$FN_ARACH";
}
States
{
Spawn:
BSPI AB 10 A_Look;
Loop;
See:
BSPI A 20;
BSPI A 3 A_BabyMetal;
BSPI ABBCC 3 A_Chase;
BSPI D 3 A_BabyMetal;
BSPI DEEFF 3 A_Chase;
Goto See+1;
Missile:
BSPI A 20 BRIGHT A_FaceTarget;
BSPI G 25 BRIGHT A_SpawnItemEx("RocketShell", 0, 32, 68, 8, 0, 1, -15, SXF_TRANSFERPOINTERS|SXF_NOCHECKPOSITION);
BSPI G 25 BRIGHT A_SpawnItemEx("RocketShell", 0, -32, 68, 8, 0, 1, 0, SXF_TRANSFERPOINTERS|SXF_NOCHECKPOSITION);
BSPI G 25 BRIGHT A_SpawnItemEx("RocketShell", 32, 0, 68, 8, 0, 1, 15, SXF_TRANSFERPOINTERS|SXF_NOCHECKPOSITION);
BSPI H 4 BRIGHT;
BSPI H 1 BRIGHT A_SpidRefire;
Goto Missile+1;
Pain:
BSPI I 3;
BSPI I 3 A_Pain;
Goto See+1;
Death:
BSPI J 20 A_Scream;
BSPI K 7 A_NoBlocking;
BSPI LMNO 7;
BSPI P -1 A_BossDeath;
Stop;
Raise:
BSPI P 5;
BSPI ONMLKJ 5;
Goto See+1;
}
}
Class RocketShell : Actor {
Default {
Damage 0;
Speed 10;
Monster;
+NOGRAVITY
+RANDOMIZE
+ROCKETTRAIL
+ZDOOMTRANS
+NEVERRESPAWN
-COUNTKILL
SeeSound "weapons/rocklf";
DeathSound "weapons/rocklx";
}
States {
Spawn:
MISL A 1 Bright;
Goto See;
See:
MISL A 1 BRIGHT A_Chase();
Loop;
Missile:
MISL B 10 RocketSplitFire();
Goto Death;
Death:
MISL B 8 Bright;
MISL C 6 Bright;
MISL D 4 Bright;
Stop;
}
override void Tick()
{
super.tick(); // Call original Tick function.
if (!master) {
ResolveState("Death");
}
}
void RocketSplitFire()
{
A_SpawnProjectile("MicroMissile", 0, -12, -10);
A_SpawnProjectile("MicroMissile", -8, 0, 0);
A_SpawnProjectile("MicroMissile", 0, 12, 10);
}
}