Classes:MarineRailgun: Difference between revisions

From ZDoom Wiki
Jump to navigation Jump to search
Content deleted Content added
m It doesn't exactly use the Skulltag railgun, so it's better to link to the generic page
updated in accordance with updated ZScriptDefinitionNote template
 
(2 intermediate revisions by 2 users not shown)
Line 10: Line 10:
A [[Classes:ScriptedMarine|scripted marine]] toting a [[railgun]].
A [[Classes:ScriptedMarine|scripted marine]] toting a [[railgun]].


==== [[ZScript]] definition ====
{{ZScriptDefinitionNote|actors/doom/scriptedmarine.zs}}
class MarineRailgun : ScriptedMarine
{
States
{
Missile:
Goto Super::Missile.Railgun;
}
}
==== [[DECORATE]] definition ====
==== [[DECORATE]] definition ====
{{DecorateDefinitionNote}}
ACTOR <u>MarineRailgun</u>: {{Class|ScriptedMarine}} 9110
ACTOR <u>MarineRailgun</u>: {{Class|ScriptedMarine}}
{
{
{{Property|Game}} Doom
States
States
{
{

Latest revision as of 11:07, 27 December 2021

Note: Wait! Stop! You do not need to copy this actor's code into your project! Here's why:
  1. This actor is already defined in GZDoom, there's no reason to define it again.
  2. In fact, trying to define an actor with the same name will cause an error (because it already exists).
  3. If you want to make your own version of this actor, use inheritance.
  4. Definitions for existing actors are put on the wiki for reference purpose only.
Space Marine with Railgun
Actor type Monster Game (Doom)
DoomEd Number 9110 Class Name MarineRailgun


Classes: ScriptedMarineMarineRailgun

A scripted marine toting a railgun.

ZScript definition

Note: The ZScript definition below is for reference and may be different in the current version of UZDoom. The most up-to-date version of this code can be found on UZDoom GitHub.
class MarineRailgun : ScriptedMarine
{
	States
	{
	Missile:
		Goto Super::Missile.Railgun;
	}

}

DECORATE definition

Warning: This is legacy code, kept for archival purposes only. DECORATE was effectively deprecated with the introduction of ZScript. UZDoom internally uses the ZScript definition above.
ACTOR MarineRailgun: ScriptedMarine
{
  States
  {
  Missile:
    Goto Super::Missile.Railgun
  }
}