Features Doom Eternal in GZdoom

Handy guides on how to do things, written by users for users.

Moderators: GZDoom Developers, Raze Developers

Forum rules
Please don't start threads here asking for help. This forum is not for requesting guides, only for posting them. If you need help, the Editing forum is for you.

Features Doom Eternal in GZdoom

Postby KadzitsuHelp » Thu Dec 17, 2020 1:03 am

Here I decided to share things from doom eternal that I managed to do in Ultimate doom builder. All of these things I used on my map: https://www.moddb.com/mods/embers-of-ar ... nloadsform
On this link you will find the test map and the necessary files: https://drive.google.com/file/d/1c68vpi ... sp=sharing
Last edited by KadzitsuHelp on Thu Jan 14, 2021 3:30 am, edited 1 time in total.
KadzitsuHelp
 
Joined: 08 Aug 2020

Re: Features Doom Eternal in GZdoom

Postby KadzitsuHelp » Thu Dec 17, 2020 1:07 am

JUMPPADS:

The essence of jumppads is to throw the player up, this is an interesting replacement for stairs.
We create a sector, decorate it as desired.
Inside the sector we put Thing Actor hits floor: 9999, set this thing to action 128: Thrust Thing Z
Thing Tag: 0
Force: to your notice
Down/Up: in our case Up
Set/Add: Set - sets the thing's vertical speed to 0 and only then applies the force. Add - adds the speed resulting from the special's force to the thing's current vertical speed.
You can also do oblique jumppad. Just put the following script on Thing Actor hits floor through Action 80: Script Execute:
Code: Select allExpand view
Script "AngleJumpPad" (void)
{
   ThrustThingZ(0, 50, 0, 0);
   ThrustThing(0, 55, 0, 0);
}
KadzitsuHelp
 
Joined: 08 Aug 2020

Re: Features Doom Eternal in GZdoom

Postby KadzitsuHelp » Thu Dec 17, 2020 1:10 am

MONKEYBARS:

Monkey bars will add variety to the movement of your maps. to create them you need a file: MonkeyBars.pk3 which contains decorate (with which the weapon will disappear when swinging) and textures (if you wish, you can draw your own) Next, in Ultimate doom builder, draw a line with textures on both sides. We write the following script:
Code: Select allExpand view
Script "MonkeyBars" (int zpos, int dir)
{


   int zmin = (zpos * 1.0) - 96.0;
   int zmax = zpos * 1.0;
   int zcur = GetActorZ(0);
   If(zcur >= zmin && zcur <= zmax)
   {
      int xvel; int yvel;
      If(dir==0){yvel = 17.0; SetActorAngle(0,0.25);}
      Else If(dir==1){xvel = 17.0; SetActorAngle(0,1.0);}
      Else If(dir==2){yvel = -17.0; SetActorAngle(0,0.75);}
      Else If(dir==3){xvel = -17.0; SetActorAngle(0,0.5);}
      If(LineSide()==1){xvel = -xvel; yvel = -yvel;
      SetActorAngle(0,GetActorAngle(0)+0.5);
   }
      PlaySound(0,"skeleton/swing",CHAN_BODY);
      GiveInventory("ClimbHand", 1); //Switch on Our Decorate
       Setweapon("ClimbHand");

      ThrustThingZ(0, 20, 1, 0);
      Delay(3);
      ThrustThingZ(0, 20, 0, 0);
      Delay(2);

      SetActorVelocity(0,xvel,yvel,9.0,0,0);
      Delay(5);
      TakeInventory("ClimbHand", 1); //Switch off Our Decorate
   }
}

You can also specify your own speed and strength values. Add a script to our line through Action 80: Script Execute.

Zpos: This is the height of the line above the floor (that is, the difference in the height of the ceiling and the offset of the texture of our monkey bar)

Dir: This is direction, 0 - north 1 - east 2 - south 3 - west
And put a check mark on:

*Repeatable action

*When player walks over

*Player can use from back side
KadzitsuHelp
 
Joined: 08 Aug 2020

Re: Features Doom Eternal in GZdoom

Postby KadzitsuHelp » Thu Dec 17, 2020 1:11 am

PUSHER:

It pushes the player in a straight line, much like monkey bars, so the script looks like. Now we don't need Decorate and the Pusher.pk3 file contains only animated textures. We put two lines, the first with a length of 128, the second with a length of 64 (this is just for beauty, you can use one line)
Putting textures. Attach the script to the line:
Code: Select allExpand view
Script "Push" (int zpos1, int dir1)
{
   int zmin1 = (zpos1 * 1.0) - 96.0;
   int zmax1 = zpos1 * 1.0;
   int zcur1 = GetActorZ(0);
   If(zcur1 >= zmin1 && zcur1 <= zmax1)
   {

      int xvel1; int yvel1;
      If(dir1==0){yvel1 = 35.0; SetActorAngle(0,0.25);}
      Else If(dir1==1){xvel1 = 35.0; SetActorAngle(0,1.0);}
      Else If(dir1==2){yvel1 = -35.0; SetActorAngle(0,0.75);}
      Else If(dir1==3){xvel1 = -35.0; SetActorAngle(0,0.5);}
      If(LineSide()==1){xvel1 = -xvel1; yvel1 = -yvel1; SetActorAngle(0,GetActorAngle(0)+0.5);}

      SetActorVelocity(0,xvel1,yvel1,0.0,0,0);
   }
}

Zpos: This is the height of the line above the floor

Dir: This is direction, 0 - north 1 - east 2 - south 3 - west
And put a check mark on:

*Repeatable action

*When player walks over
KadzitsuHelp
 
Joined: 08 Aug 2020

Re: Features Doom Eternal in GZdoom

Postby KadzitsuHelp » Thu Dec 17, 2020 1:17 am

BREAKABLE WALL:

This is a brutal replacement for ordinary doors. To create this wall I used a glass break script (I didn't find a link to the forum, just know that the script is not mine). I replaced some components and textures in it, all this is contained in the BreakWall.pk3 file. You can also use your own textures and sounds. In Ultimate doom builder in user-defigned you will have Thing map spot ceiling.
We put a texture on our line and assign a tag to it. At one end of the line we put Thing map spot ceiling (we assign the same tag as the line), at the other end of the line we put Thing map spot (the tag is the same as for the line but with a minus sign)
We align things diagonally so that the map spot is above the map spot ceiling.
Attach the script to the line:
Code: Select allExpand view
script 1 (int a)
{
    print(s:"angle: ", i:a);
}

script "BreakWalls" (int id)
{

    int tid = id;
    int spawndistance = 8;

    int x1 = GetActorX(tid) >> 16;
    int y1 = GetActorY(tid) >> 16;
    int z1 = GetActorZ(tid) >> 16;
    int angle = GetActorAngle(tid) >> 8;

    int x2 = GetActorX(-tid) >> 16;
    int y2 = GetActorY(-tid) >> 16;
    int z2 = GetActorZ(-tid) >> 16;


    int hlength = linelength(x1, y1, x2, y2);
    int hnumsteps = fixeddiv(hlength<<2, spawndistance<<5);
    int hstepsize = fixeddiv(1.0, hnumsteps);


    int vnumsteps = fixeddiv(abs(z1 - z2)<<2, spawndistance<<5);
    int vstepsize = fixeddiv(1.0, vnumsteps);

    for(int hu = 0.0; hu < 1.0; hu += hstepsize)
    {
        int x = coordat(x1, x2, hu);
        int y = coordat(y1, y2, hu);

        for(int vu = 0.0; vu < 1.0; vu += vstepsize)
        {
            int z  = coordat(z1, z2, vu);
            Spawn("WallsShardSpawner", x, y, z, 0, angle);

        }
    }


    Setlineblocking(id, OFF);
    thingsound(id, "Walls", 127);
}

function int linelength(int x1, int y1, int x2, int y2)
{
    int d1 = abs(x2 - x1);
    int d2 = abs(y2 - y1);

    return sqrt(d1*d1 + d2*d2);
}


function int coordat(int a, int b, int u)
{
    a <<= 16;
    b <<= 16;

    return a + fixedmul(u, (b - a));
}


function int abs (int x)
{
    if (x < 0)
        return -x;

    return x;
}

Id: Our line's tag

And put a check mark on:

*Impassable

*On projectile impact

*Front side only
KadzitsuHelp
 
Joined: 08 Aug 2020

Re: Features Doom Eternal in GZdoom

Postby KadzitsuHelp » Thu Dec 17, 2020 1:19 am

I myself am still new to all this, so I could not do without outside help. Thanks to those people who helped me on the forums (I also don't know English well, so if you don't understand something, then ask) :)
The same tutorials but with pictures at this link (the site does not allow me to upload pictures): https://www.doomworld.com/forum/topic/1 ... in-gzdoom/
KadzitsuHelp
 
Joined: 08 Aug 2020


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 0 guests