How can I make the walls move as traps?

Off-topic chat. Real talk.
Post Reply
User avatar
Hellsmith1
 
Posts: 58
Joined: Fri Jan 23, 2015 9:08 am
Location: Jasper county Indiana

How can I make the walls move as traps?

#1

Post by Hellsmith1 » Sat Jun 29, 2019 3:00 am

I'm having trouble with making walls move automatically so I can set it up as traps just like in rise of the triad?
I'm using the skulltag (Doom in Hexen format) in doom builder 2.

User avatar
TDRR
Forum Regular
Posts: 214
Joined: Thu Jun 28, 2018 9:13 pm
Location: Venezuela

Re: How can I make the walls move as traps?

#2

Post by TDRR » Sat Jun 29, 2019 3:10 am

This page: https://zdoom.org/wiki/PolyObjects should have a lot of info regarding moving walls. If you need any help understanding it, just ask.
"I will find joy in Yahweh. I will delight in my Elohim. He has dressed me in the clothes of salvation. He has wrapped me in the robe of righteousness like a bridegroom with a priest’s turban, like a bride with her jewels."
-Isaiah 61:10 (Names of God Bible)

User avatar
Hellsmith1
 
Posts: 58
Joined: Fri Jan 23, 2015 9:08 am
Location: Jasper county Indiana

Re: How can I make the walls move as traps?

#3

Post by Hellsmith1 » Sat Jun 29, 2019 4:34 am

I need help understanding it a little bit more and I would like to see a video on how its done correctly.

User avatar
TDRR
Forum Regular
Posts: 214
Joined: Thu Jun 28, 2018 9:13 pm
Location: Venezuela

Re: How can I make the walls move as traps?

#4

Post by TDRR » Sat Jun 29, 2019 4:41 am

Hellsmith1 wrote:
Sat Jun 29, 2019 4:34 am
I need help understanding it a little bit more and I would like to see a video on how its done correctly.
Well, i can't provide a video but at least i'm going to try until someone else comes and does it better. What is your issue? You need help moving the polyobject or making it?
"I will find joy in Yahweh. I will delight in my Elohim. He has dressed me in the clothes of salvation. He has wrapped me in the robe of righteousness like a bridegroom with a priest’s turban, like a bride with her jewels."
-Isaiah 61:10 (Names of God Bible)

User avatar
Hellsmith1
 
Posts: 58
Joined: Fri Jan 23, 2015 9:08 am
Location: Jasper county Indiana

Re: How can I make the walls move as traps?

#5

Post by Hellsmith1 » Sat Jun 29, 2019 4:53 am

Will I'm trying to make a wall move automatically as traps without switches or pushing the wall like in rise of the triad.

I tried every polyobject but the only one is polyobject move.

User avatar
TDRR
Forum Regular
Posts: 214
Joined: Thu Jun 28, 2018 9:13 pm
Location: Venezuela

Re: How can I make the walls move as traps?

#6

Post by TDRR » Sat Jun 29, 2019 6:34 am

Hellsmith1 wrote:
Sat Jun 29, 2019 4:53 am
Will I'm trying to make a wall move automatically as traps without switches or pushing the wall like in rise of the triad.

I tried every polyobject but the only one is polyobject move.
Make a linedef trigger "Polyobject move" when walking over it. I would tell you the specifics but i'm not 100% sure how it's used without ACS on the map itself. I know it's possible though.

EDIT: Oh you mean they always move? You need an ACS script for that, i can write it for you but it's up to you to compile it and put it into your wad. This is easy if you are using anything Doom Builder 2 and newer. I'd need the map file, if you want you can private message it.
"I will find joy in Yahweh. I will delight in my Elohim. He has dressed me in the clothes of salvation. He has wrapped me in the robe of righteousness like a bridegroom with a priest’s turban, like a bride with her jewels."
-Isaiah 61:10 (Names of God Bible)

User avatar
Hellsmith1
 
Posts: 58
Joined: Fri Jan 23, 2015 9:08 am
Location: Jasper county Indiana

Re: How can I make the walls move as traps?

#7

Post by Hellsmith1 » Sat Jun 29, 2019 7:11 am

Before I send you my map file, tell me how you write it in the script form for the ACS script 1st and see if I can get it to work myself.

If it doesn't work then I'll send you the map file.

User avatar
TDRR
Forum Regular
Posts: 214
Joined: Thu Jun 28, 2018 9:13 pm
Location: Venezuela

Re: How can I make the walls move as traps?

#8

Post by TDRR » Sat Jun 29, 2019 6:53 pm

Hellsmith1 wrote:
Sat Jun 29, 2019 7:11 am
Before I send you my map file, tell me how you write it in the script form for the ACS script 1st and see if I can get it to work myself.

If it doesn't work then I'll send you the map file.
If you like, here's how it goes:
Open Doom Builder's script editor and copy this:
#include "zcommon.acs"

int PolyobjectNumber = X;
int SpeedofPolyobject = X;
int IdOfMapspot = X;
int IdOfMapspot2 = X;

Script "StartupPolyTraps" OPEN
{
Polyobj_MoveToSpot(PolyobjectNumber, SpeedofPolyobject, IdOfMapspot);
PolyWait(PolyobjectNumber);
Polyobj_MoveToSpot(PolyobjectNumber, SpeedofPolyobject, IdOfMapspot2);
PolyWait(PolyobjectNumber);
restart;
}
At the top of the text you should see a few "int" definitions. The X is a placeholder, replace it with your desired number as explained here:
Change PolyobjectNumber to the polyobject number you are going to move (The number for the polyobject specified in it's Polyobject Startline special), SpeedofPolyobject should be changed until you find a speed you like, and IdOfMapspot is essentially just placing the thing under the ZDoom category of thing types called "Map spot" and giving it a TID of whatever you want, as long as it's a tid you haven't used before. The Polyobject will move to the position of whatever mapspot you told it to.

You will notice there's a second set of these. IdOfMapspot2 tells the polyobject where it's going to go after reaching the first one, and this loops over and over again.

Now, the polyobject will keep moving between both mapspots again and again, like it did in Rise of the Triad and in some levels of Shadow Warrior, hope this is the effect you wanted. Remember you must use thing type 9303, also known as Polyobject start (hurts to touch) so it damages the player on contact.

Oh yeah, and don't change the script itself, the part between { } brackets should not be changed, only the "int" things at the top of the text should be modified.
"I will find joy in Yahweh. I will delight in my Elohim. He has dressed me in the clothes of salvation. He has wrapped me in the robe of righteousness like a bridegroom with a priest’s turban, like a bride with her jewels."
-Isaiah 61:10 (Names of God Bible)

User avatar
Hellsmith1
 
Posts: 58
Joined: Fri Jan 23, 2015 9:08 am
Location: Jasper county Indiana

Re: How can I make the walls move as traps?

#9

Post by Hellsmith1 » Sun Jun 30, 2019 12:40 am

I'm in doom builder writing and wrote down the script that you gave me and I went to compile the script and it's giving me 1 error saying that invalid identifier line2 but there's nothing there.

User avatar
Hellsmith1
 
Posts: 58
Joined: Fri Jan 23, 2015 9:08 am
Location: Jasper county Indiana

Re: How can I make the walls move as traps?

#10

Post by Hellsmith1 » Mon Jul 01, 2019 2:13 am

@TDRR do you get the map that I have sent to you?

User avatar
TDRR
Forum Regular
Posts: 214
Joined: Thu Jun 28, 2018 9:13 pm
Location: Venezuela

Re: How can I make the walls move as traps?

#11

Post by TDRR » Mon Jul 01, 2019 7:12 pm

Hellsmith1 wrote:
Sun Jun 30, 2019 12:40 am
I'm in doom builder writing and wrote down the script that you gave me and I went to compile the script and it's giving me 1 error saying that invalid identifier line2 but there's nothing there.
Your Doom Builder version must be outdated, i don't get any errors when compiling it. Use Doom Builder X instead because DB2 is old and unsupported: https://www.doomworld.com/forum/topic/9 ... b2/?page=8
"I will find joy in Yahweh. I will delight in my Elohim. He has dressed me in the clothes of salvation. He has wrapped me in the robe of righteousness like a bridegroom with a priest’s turban, like a bride with her jewels."
-Isaiah 61:10 (Names of God Bible)

User avatar
Hellsmith1
 
Posts: 58
Joined: Fri Jan 23, 2015 9:08 am
Location: Jasper county Indiana

Re: How can I make the walls move as traps?

#12

Post by Hellsmith1 » Mon Jul 01, 2019 10:45 pm

I sent you my map file couple of days ago did you get it?

User avatar
TDRR
Forum Regular
Posts: 214
Joined: Thu Jun 28, 2018 9:13 pm
Location: Venezuela

Re: How can I make the walls move as traps?

#13

Post by TDRR » Tue Jul 02, 2019 3:59 am

Hellsmith1 wrote:
Mon Jul 01, 2019 10:45 pm
I sent you my map file couple of days ago did you get it?
Yeah, and i edited it too but i forgot to send it back to you, sorry.

http://www.mediafire.com/file/vcw21bcng ... 1.wad/file
You can open the script editor and see what's there, should be easy to understand and change.
"I will find joy in Yahweh. I will delight in my Elohim. He has dressed me in the clothes of salvation. He has wrapped me in the robe of righteousness like a bridegroom with a priest’s turban, like a bride with her jewels."
-Isaiah 61:10 (Names of God Bible)

User avatar
Hellsmith1
 
Posts: 58
Joined: Fri Jan 23, 2015 9:08 am
Location: Jasper county Indiana

Re: How can I make the walls move as traps?

#14

Post by Hellsmith1 » Tue Jul 02, 2019 9:05 am

I got it working.

(int PolyobjectNumber = X;
int SpeedofPolyobject = X;
int IdOfMapspot = X;
int IdOfMapspot2 = X;)

You don't need int polyobjects or the other int.

This is the correct way to make the walls move on there own.

Script "StartupPolyTraps" OPEN
{
Polyobj_Move(PolyobjectNumber, SpeedofPolyobject, angel,distance)
PolyWait(PolyobjectNumber);
Polyobj_Move(PolyobjectNumber, SpeedofPolyobject, Angel, distance);
PolyWait(PolyobjectNumber);
restart;
}

Thank you for the updates on the doom builder X and thank you for your help.

User avatar
TDRR
Forum Regular
Posts: 214
Joined: Thu Jun 28, 2018 9:13 pm
Location: Venezuela

Re: How can I make the walls move as traps?

#15

Post by TDRR » Tue Jul 02, 2019 8:12 pm

Hellsmith1 wrote:
Tue Jul 02, 2019 9:05 am
I got it working.

(int PolyobjectNumber = X;
int SpeedofPolyobject = X;
int IdOfMapspot = X;
int IdOfMapspot2 = X;)

You don't need int polyobjects or the other int.

This is the correct way to make the walls move on there own.

Script "StartupPolyTraps" OPEN
{
Polyobj_Move(PolyobjectNumber, SpeedofPolyobject, angel,distance)
PolyWait(PolyobjectNumber);
Polyobj_Move(PolyobjectNumber, SpeedofPolyobject, Angel, distance);
PolyWait(PolyobjectNumber);
restart;
}

Thank you for the updates on the doom builder X and thank you for your help.
No problem, glad to be of help. You may need the other ints if you want to add more polyobjects though, which is the whole reason i added them.
"I will find joy in Yahweh. I will delight in my Elohim. He has dressed me in the clothes of salvation. He has wrapped me in the robe of righteousness like a bridegroom with a priest’s turban, like a bride with her jewels."
-Isaiah 61:10 (Names of God Bible)

User avatar
Hellsmith1
 
Posts: 58
Joined: Fri Jan 23, 2015 9:08 am
Location: Jasper county Indiana

Re: How can I make the walls move as traps?

#16

Post by Hellsmith1 » Wed Jul 03, 2019 8:16 am

But there are 2 down falls I see about using walls as traps is if a monster or player is in the wall path it will crush but it doesn't go through the monster or the player it just stops until it gets crushed.

Another one is that the wall doesn't stay inside the map area it will go outside of the map and is there actually a way to prevent that from happening?

User avatar
TDRR
Forum Regular
Posts: 214
Joined: Thu Jun 28, 2018 9:13 pm
Location: Venezuela

Re: How can I make the walls move as traps?

#17

Post by TDRR » Wed Jul 03, 2019 4:03 pm

Hellsmith1 wrote:
Wed Jul 03, 2019 8:16 am
But there are 2 down falls I see about using walls as traps is if a monster or player is in the wall path it will crush but it doesn't go through the monster or the player it just stops until it gets crushed.
This is a limitation of polyobjects and there's sadly no way to fix it.
Another one is that the wall doesn't stay inside the map area it will go outside of the map and is there actually a way to prevent that from happening?
It's very simple: Keep the second mapspot in the game area, not outside.
"I will find joy in Yahweh. I will delight in my Elohim. He has dressed me in the clothes of salvation. He has wrapped me in the robe of righteousness like a bridegroom with a priest’s turban, like a bride with her jewels."
-Isaiah 61:10 (Names of God Bible)

Post Reply