Editing Creating a projectile

From Eternity Wiki
Jump to navigationJump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
In this tutorial, we will look at the projectile we made during [[creating a monster]] in greater detail.
In this tutorial, we will look at the projectile we made during [[creating a monster]] in greater detail.


First off we need to define two files, EDFROOT and EPRJCTLS (or any other name of your choosing). EDFROOT should look like this.
Like the prior tutorial, we want to import the entries from SS_START to SS_END from [http://www.realm667.com/index.php/en/component/docman/?task=doc_download&gid=285 the aracnorb] from the Realm667 bestiary by [http://doomwiki.org/wiki/James_Paddock_(Jimmy) James Paddock (Jimmy)].
stdinclude("root.edf")
// New projectiles:
lumpinclude("EPRJCTLS") // Change this based on whatever you're calling your equivalent of EPRJCTLS.
 
Now we'll create a new projectile that replaces the rockets entirely, using solely IWAD assets, within EPRJCTLS.
 
thingtype DriftingEnergyNuke        // This name is given due to it lazily drifting along before exploding.
{
    basictype PlayerProjectile      // Flags: NOBLOCKMAP | NOGRAVITY | DROPOFF | MISSILE | NOCROSS | SPACMISSILE
    dehackednum 34                  // This tells the engine that this thing type has the same dehackednum as the rocket,
                                    // meaning that players and Cyberdemons will shoot this instead. You can still access
                                    // RocketShot by summoning it though.
    radius 13.0
    height 8.0
    speed 4.0                        // As this is a projectile, this value is used as a constant speed.
    damage 10                        // Damage dealt uses the formula damage*random(1,8).
    seesound keenpn                  // Keen pain sound.
    deathsound keendt                // Keen death sound.
    addflags TRANSLUCENT            // Makes the projectile translucent.
    States
    @"
    Spawn:
      BAL1 AB 1 Bright A_Tracer    // The projectile doesn't have the SEEKERMISSILE flag set so it can't actually
      BAL2 AB 1 Bright A_Tracer    // trace our target, but we're only placing it here for the trail anyways.
      APLS AB 1 Bright A_Tracer
      PLSS AB 1 Bright A_Tracer
      Loop
    Death:
      BAL1 CDE 5 Bright A_Mushroom // A_Mushroom is what gives the explosive property of our projectile.
                                    // It spawns an explosion, and then a number of MancubusShot projectiles.
      Stop                        // As the previous frame has a finite duration, this function is called and
                                    // the projectile will disappear.
    "@
}
 
Simply going into the game and firing a rocket launcher, being fired at by a Cyberdemon, or using "summon DriftingEnergyNuke" will create this new projectile that we've created.
For the projectile we will be using new assets. Like the prior tutorial, we want to import the entries from SS_START to SS_END from [http://www.realm667.com/index.php/en/component/docman/?task=doc_download&gid=285 the aracnorb] from the Realm667 bestiary by [[doom_wiki:James Paddock (Jimmy)|James Paddock (Jimmy)]].
 
  thingtype AracnorbBall
  thingtype AracnorbBall
  {
  {
     basictype Seeker // This uses a predefined set of flags for this object. basictype FlyingMonster is equivalent
     basictype Seeker // This uses a predefined set of flags for this object. basictype FlyingMonster is equivalent
                     // to setting cflags as NOBLOCKMAP | NOGRAVITY | DROPOFF | MISSILE | NOCROSS | SEEKERMISSILE.
                     // to setting cflags as NOBLOCKMAP | NOGRAVITY | DROPOFF | MISSILE | NOCROSS | SEEKERMISSILE.
                    // SEEKERMISSILE is the flag that allows this to trace targets.
     radius 13.0
     radius 13.0
     height 8.0
     height 8.0
Line 54: Line 13:
     deathsound firxpl
     deathsound firxpl
     addflags TRANSLUCENT|SPACMISSILE  // This adds the flags so that the projectile is translucent and can activate
     addflags TRANSLUCENT|SPACMISSILE  // This adds the flags so that the projectile is translucent and can activate
                                       // generalised linedefs marked with the MISSILE special activation flag.
                                       // generalised linedefs marked with the MISSILE special activation flag
     States
     States
     @"
     @"
     Spawn:
     Spawn:
       ACNF AABB 1 Bright A_GenTracer // This causes the projectile to trace its target. Not calling this would mean that
       ACNF AABB 1 Bright A_GenTracer // This causes the projectile to trace its target.
                                      // the projectile travels in a straight line.
       Loop
       Loop
     Death:
     Death:
Line 66: Line 24:
     "@
     "@
  }
  }
We can now put "summon AracnorbBall" in the console to create this projectile, and if we were to create a monster that uses this (which we did in [[Creating a monster]], we would find that it traces our movement.
Please note that all contributions to Eternity Wiki are considered to be released under the GNU Free Documentation License 1.2 (see Eternity Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)