qzdoom/wadsrc/static/zscript/doom/scriptedmarine.txt
Christoph Oelckers 784f7ed671 - converted all of Doom's actors.
- fixed a few problems that were encountered during conversion:
 * action specials as action functions were not recognized by the parser.
 * Player.StartItem could not be parsed.
 * disabled the naming hack for PowerupType. ZScript, unlike DECORATE will never prepend 'Power' to the power's name, it always needs to specified by its full name.
 * states and defaults were not checked for empty bodies.
 * the scope qualifier for goto labels was not properly converted to a string, because it is an ENamedName, not an FName.
2016-10-14 20:08:41 +02:00

309 lines
5.2 KiB
Text

// Scriptable marine -------------------------------------------------------
class ScriptedMarine : Actor native
{
Default
{
Health 100;
Radius 16;
Height 56;
Mass 100;
Speed 8;
Painchance 160;
MONSTER;
-COUNTKILL
Translation 0;
Damage 100;
DeathSound "*death";
PainSound "*pain50";
}
action native void A_M_Refire (bool ignoremissile=false);
action native void A_M_CheckAttack ();
action native void A_MarineChase ();
action native void A_MarineLook ();
action native void A_MarineNoise ();
action native void A_M_Punch (int force);
action native void A_M_SawRefire ();
action native void A_M_FirePistol (bool accurate);
action native void A_M_FireShotgun ();
action native void A_M_FireShotgun2 ();
action native void A_M_FireCGun(bool accurate);
action native void A_M_FireMissile ();
action native void A_M_FirePlasma ();
action native void A_M_FireRailgun ();
action native void A_M_BFGsound ();
action native void A_M_FireBFG ();
States
{
Spawn:
PLAY A 4 A_MarineLook;
PLAY A 4 A_MarineNoise;
Loop;
Idle:
PLAY A 4 A_MarineLook;
PLAY A 4 A_MarineNoise;
PLAY A 4 A_MarineLook;
PLAY B 4 A_MarineNoise;
PLAY B 4 A_MarineLook;
PLAY B 4 A_MarineNoise;
Loop;
See:
PLAY ABCD 4 A_MarineChase;
Loop;
Melee.Fist:
PLAY E 4 A_FaceTarget;
PLAY E 4 A_M_Punch(1);
PLAY A 9;
PLAY A 0 A_M_Refire(1);
Loop;
PLAY A 5 A_FaceTarget;
Goto See;
Melee.Berserk:
PLAY E 4 A_FaceTarget;
PLAY E 4 A_M_Punch(10);
PLAY A 9;
PLAY A 0 A_M_Refire(1);
Loop;
PLAY A 5 A_FaceTarget;
Goto See;
Melee.Chainsaw:
PLAY E 4 A_MarineNoise;
PLAY E 4 A_M_Saw;
PLAY E 0 A_M_SawRefire;
goto Melee.Chainsaw+1;
PLAY A 0;
Goto See;
Missile:
Missile.None:
PLAY E 12 A_FaceTarget;
Goto Idle;
PLAY F 6 BRIGHT;
Loop;
Missile.Pistol:
PLAY E 4 A_FaceTarget;
PLAY F 6 BRIGHT A_M_FirePistol(1);
PLAY A 4 A_FaceTarget;
PLAY A 0 A_M_Refire;
PLAY A 5;
Goto See;
Fireloop.Pistol:
PLAY F 6 BRIGHT A_M_FirePistol(0);
PLAY A 4 A_FaceTarget;
PLAY A 0 A_M_Refire;
Goto Fireloop.Pistol;
PLAY A 5;
Goto See;
Missile.Shotgun:
PLAY E 3 A_M_CheckAttack;
PLAY F 7 BRIGHT A_M_FireShotgun;
Goto See;
Missile.SSG:
PLAY E 3 A_M_CheckAttack;
PLAY F 7 BRIGHT A_M_FireShotgun2;
Goto See;
Missile.Chaingun:
PLAY E 4 A_FaceTarget;
PLAY FF 4 BRIGHT A_M_FireCGun(1);
PLAY FF 4 BRIGHT A_M_FireCGun(0);
PLAY A 0 A_M_Refire;
Goto Missile.Chaingun+3;
PLAY A 0;
Goto See;
Missile.Rocket:
PLAY E 8;
PLAY F 6 BRIGHT A_M_FireMissile;
PLAY E 6;
PLAY A 0 A_M_Refire;
Loop;
PLAY A 0;
Goto See;
Missile.Plasma:
PLAY E 2 A_FaceTarget;
PLAY E 0 A_FaceTarget;
PLAY F 3 BRIGHT A_M_FirePlasma;
PLAY A 0 A_M_Refire;
Goto Missile.Plasma+1;
PLAY A 0;
Goto See;
Missile.Railgun:
PLAY E 4 A_M_CheckAttack;
PLAY F 6 BRIGHT A_M_FireRailgun;
Goto See;
Missile.BFG:
PLAY E 5 A_M_BFGSound;
PLAY EEEEE 5 A_FaceTarget;
PLAY F 6 BRIGHT A_M_FireBFG;
PLAY A 4 A_FaceTarget;
PLAY A 0 A_M_Refire;
Loop;
PLAY A 0;
Goto See;
SkipAttack:
PLAY A 1;
Goto See;
Pain:
PLAY G 4;
PLAY G 4 A_Pain;
Goto Idle;
Death:
PLAY H 10;
PLAY I 10 A_Scream;
PLAY J 10 A_NoBlocking;
PLAY KLM 10;
PLAY N -1;
Stop;
XDeath:
PLAY O 5;
PLAY P 5 A_XScream;
PLAY Q 5 A_NoBlocking;
PLAY RSTUV 5;
PLAY W -1;
Stop;
Raise:
PLAY MLKJIH 5;
Goto See;
}
}
//---------------------------------------------------------------------------
class MarineFist : ScriptedMarine
{
States
{
Melee:
Goto Super::Melee.Fist;
Missile:
Stop;
}
}
//---------------------------------------------------------------------------
class MarineBerserk : MarineFist
{
States
{
Melee:
Goto Super::Melee.Berserk;
Missile:
Stop;
}
}
//---------------------------------------------------------------------------
class MarineChainsaw : ScriptedMarine
{
States
{
Melee:
Goto Super::Melee.Chainsaw;
Missile:
Stop;
}
}
//---------------------------------------------------------------------------
class MarinePistol : ScriptedMarine
{
States
{
Missile:
Goto Super::Missile.Pistol;
}
}
//---------------------------------------------------------------------------
class MarineShotgun : ScriptedMarine
{
States
{
Missile:
Goto Super::Missile.Shotgun;
}
}
//---------------------------------------------------------------------------
class MarineSSG : ScriptedMarine
{
States
{
Missile:
Goto Super::Missile.SSG;
}
}
//---------------------------------------------------------------------------
class MarineChaingun : ScriptedMarine
{
States
{
Missile:
Goto Super::Missile.Chaingun;
}
}
//---------------------------------------------------------------------------
class MarineRocket : MarineFist
{
States
{
Missile:
Goto Super::Missile.Rocket;
}
}
//---------------------------------------------------------------------------
class MarinePlasma : ScriptedMarine
{
States
{
Missile:
Goto Super::Missile.Plasma;
}
}
//---------------------------------------------------------------------------
class MarineRailgun : ScriptedMarine
{
States
{
Missile:
Goto Super::Missile.Railgun;
}
}
//---------------------------------------------------------------------------
class MarineBFG : ScriptedMarine
{
States
{
Missile:
Goto Super::Missile.BFG;
}
}