Next up, a friendly Alien to use as an ally or in a Black Magic spell!
Inheriting from the previous class, this one grows from a chestburster (try spawning one in a resurrected Zombieman corpse as he is resurrecting) into a full-sized ALIEN, hisses at you, then trots off to kill your enemies! Please note that this also is a release candidate and has NOT yet been uploaded to the Archive.
The A_FacePlayer() codepointer (yes, we still speak DeHackEd
![Razz :p](./images/smilies/icon_razz.gif)
) may also be useful in other mods as it is more-or-less generic and was not written with only this class in mind. On that note, please can anyone interested in this play the heck out of it in multiplayer, as DM and CoOp are something I never do and wouldn't know where to start.
Screenshots:
Text file:
Code: Select all
===========================================================================
Archive Maintainer :
Update to :
Advanced engine needed : GZDoom 2.3.0+
Primary purpose : No levels included
===========================================================================
Title : The Alien of Aggression
Filename : alienofa.pk3
Release date : 16th May 2020 [RC1]
Author : Martin Howe
Email Address : martinhowe426@gmail.com
Other Files By Author :
Misc. Author Info :
Description : A friendly A L I E N that can bite or slash
This variant is primarily intended as a player
helper to be summoned by a black magic artifact;
as such, it is suitable for most game styles.
Additional Credits to : Authors of AvPvT, AlienDoom and Psychosis Doom2
===========================================================================
* What is included *
New levels : None
Sounds : Yes
Music : No
Graphics : Yes
Dehacked/BEX Patch : No
Demos : No
Other : ZSCRIPT, SNDINFO
Other files required : alien.pk3
* Play Information *
Game : DOOM / DOOM2 / Heretic / Hexen
Map # :
Single Player : Designed for
Cooperative 2-4 Player : Designed for BUT UNTESTED
Deathmatch 2-4 Player : Designed for BUT UNTESTED
Other game styles : Not tested but should work for some of them
Difficulty Settings : Not implemented
* Construction *
Base : Modified Alien (mostly) from Psychosis Doom II
Build Time : About fourteen days (not all at once)
Editor(s) used : SLumpEd, UnWad, Audacity, Paint.net, EditPlus
Known Bugs :
May Not Run With :
Tested With : GZDoom 4.3.3
* Copyright / Permissions *
Authors MAY use the contents of this file as a base for modification or
reuse. Permissions have been obtained from original authors for any of
their resources modified or included in this file.
You MAY distribute this file, provided you include this text file, with
no modifications. You may distribute this file in any electronic
format (BBS, Diskette, CD, etc) as long as you include this file
intact. I have received permission from the original authors of any
modified or included content in this file to allow further distribution.
* Where to get the file that this text file describes *
The Usual: ftp://archives.gamers.org/pub/idgames/ and mirrors
Web sites:
FTP sites:
* Technical Information *
The graphics are 24-bit PNG, so the class can be used in Heretic and HeXen
if required; however, it is primarily intended for Doom and Doom II.
The class Alien is a classic Alien and will attack you and anything that
hurts it. The class AlienOfAggression grows from a chestburster in a few
seconds, hisses at you, then runs off and attacks your enemies.
This looks really good in a resurrection spell; after using the Heal state
to resurrect a dead monster, the healing actor can immediately kill the
resurrectee with gib death and spawn an alien at the same place; it looks
in-game as if the resurrectee has been chestbursted!
This class is intended as a component for use in larger works, but you can
summon one at the GZDoom console to try it in-game.
===========================================================================
ZScript
Code: Select all
// --- THE ALIEN OF AGGRESSION -------------------------------------------------
Class AlienOfAggression : Alien
{
const MAX_DOUBLE = 18446744073709551616.0; // 2**64 should be enough here
void A_FacePlayer()
{
// Easy case: if a player friend
// is defined, then use that one.
Actor player = GetPointer(AAPTR_FRIENDPLAYER);
if (player)
{
A_Face(player);
return;
}
// If there is only one player
// in the game, then use that one.
int player_count = 0;
int player_found = -1; // Cache most recent player found
Actor players[MAXPLAYERS];
int ptr_target = AAPTR_PLAYER1;
for (int i = 0; i < MAXPLAYERS; i++)
{
players[i] = GetPointer(ptr_target);
if (players[i])
{
player_count++;
player_found = i;
}
ptr_target = ptr_target << 1;
}
if (player_count == 1)
{
if (player_found > -1)
{
A_Face(players[player_found]);
return;
}
console.printf("**** ERROR: EINVAL([A_FacePlayer]: player_count[1] && player_found[-1]");
return;
}
// Multiple players and no player friend; use
// whoever is closest of those in line-of-sight.
double distance = MAX_DOUBLE;
player_found = -1;
for (int i = 0; i < MAXPLAYERS; i++)
{
if (players[i] && CheckSight(players[i]))
{
double d = Distance3D(players[i]);
if (d < distance)
{
distance = d;
player_found = i;
}
}
}
if (player_found > -1)
{
A_Face(players[player_found]);
return;
}
// Same as above but none are in line of sight,
// so use the closest one. Not sure if worth
// it, but ALIENs can see through walls, etc.
for (int i = 0; i < MAXPLAYERS; i++)
{
if (players[i])
{
double d = Distance3D(players[i]);
if (d < distance)
{
distance = d;
player_found = i;
}
}
}
if (player_found > -1)
{
A_Face(players[player_found]);
return;
}
// This should be unreachable
console.printf(" **** ERROR: EINVAL([A_FacePlayer]: player_count[%d] && player_found[-1] regardless of LOS");
return;
}
Default
{
//
//~AlienOfAggression
//~=================
//~Class Name : AlienOfAggression
//~DoomEdNum : N/A
//~Formal Name : The Alien Of Aggression
//~Type : Animal
//~Group : Biowarfare
//~Melee Attack : Scratch/Bite
//~Missile Attack : None
//~Drop Item : None
//~Description : A friendly A L I E N that can bite or slash
//~
//~ This variant is primarily intended as a player
//~ helper to be summoned by a black magic artifact;
//~ as such, it is suitable for most game styles.
//~
//~Documentation : The graphics are 24-bit PNG, so the class can be used in Heretic and HeXen
//~ if required; however, it is primarily intended for Doom and Doom II.
//~
//~ The class Alien is a classic Alien and will attack you and anything that
//~ hurts it. The class AlienOfAggression grows from a chestburster in a few
//~ seconds, hisses at you, then runs off and attacks your enemies.
//~
//~ This looks really good in a resurrection spell; after using the Heal state
//~ to resurrect a dead monster, the healing actor can immediately kill the
//~ resurrectee with gib death and spawn an alien at the same place; it looks
//~ in-game as if the resurrectee has been chestbursted!
//~
//~ This class is intended as a component for use in larger works, but you can
//~ summon one at the GZDoom console to try it in-game.
//~
//~Idea : Just burst out of my, er, popped into my head :)
//~Source : Variously AvTvP, AlienDoom, Psychosis Doom II
//~Credit : The authors of those works, Fox, Giger, etc.
//
//$Category DOOMER
//$Sprite ALYPA2
//
+FRIENDLY;
}
States
{
Spawn:
ALYP A 1;
ALYP A 10;
ALYP A 10;
ALYP A 10;
ALYP A 10;
ALYP B 10;
ALYP B 10;
ALYO B 10;
ALYP B 10;
ALYQ B 10;
ALYP B 10;
ALYP B 10;
ALYP B 10 A_PlaySound("alien/chatter");
ALYP B 10;
ALYP B 10;
ALYP B 10;
ALYO C 15 A_PlaySound("alien/grow");
ALYP D 15;
ALYQ E 15;
ALYP F 15;
ALYP G 20;
ALYO G 20;
ALYP G 25 A_PlaySound("alien/active");
ALYQ G 35;
////////////////////////////////////////////////
// Have ALIEN make a show of defiance at player,
// before trotting off to kill player's enemies.
////////////////////////////////////////////////
ALYP G 7;
ALYP G 7;
ALYP G 7;
ALYP G 7;
ALYP G 7 A_FacePlayer();
ALYP H 45 A_PlaySound("alien/sight");
ALYN C 15;
ALYN B 15;
ALYN A 15;
Goto See;
}
}
// -----------------------------------------------------------------------------
SndInfo
Code: Select all
// --- ALIEN CHESTBURSTER ------------------------------------------------------
alien/crack alyncrak // Alien cracks open the host's ribcage
alien/burst alynbrst // Alien bursts out of the host
alien/chatter alynchtr // Alien chatters menacingly while growing
alien/grow alyngrow // Alien hisses menacingly while growing
You do not have the required permissions to view the files attached to this post.