Changing Triggers

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
Hindsight2020
Posts: 261
Joined: Wed Mar 20, 2013 3:29 am
Location: Indiana, USA

Changing Triggers

Post by Hindsight2020 »

I want to make a door that must first be triggered by being hit, but then switch to use button. Is it possible to switch triggers in scripting?

I have much faith in this site, you all have always been on the spot!

Thanks for your help doomers!
User avatar
Arch
Posts: 491
Joined: Thu Nov 10, 2011 12:06 pm
Contact:

Re: Changing Triggers

Post by Arch »

As far as I know, it can't be done. The way I would try to hack it:

Three lines, as close as possible. First one is the shootable one. Second one is a block players line, and the third the usable switch, that cant be reached now because of the blocking line (ajust the distance). You need a script for the first one, so when it is shot, it also unblocks the second one (http://zdoom.org/wiki/Line_SetBlocking). Now you can reach the third line and use it to open the door.

Not guaranteed it will work, but you can give it a try.
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: Changing Triggers

Post by cocka »

It can only be done in UDMF where you can set more than one activation mode on a line.

Demo wad: (Hexen in UDMF)

updated version:
aktivacio.wad
(5.93 KiB) Downloaded 25 times
User avatar
Hindsight2020
Posts: 261
Joined: Wed Mar 20, 2013 3:29 am
Location: Indiana, USA

Re: Changing Triggers

Post by Hindsight2020 »

Arch wrote:As far as I know, it can't be done. The way I would try to hack it:

Three lines, as close as possible. First one is the shootable one. Second one is a block players line, and the third the usable switch, that cant be reached now because of the blocking line (ajust the distance). You need a script for the first one, so when it is shot, it also unblocks the second one (http://zdoom.org/wiki/Line_SetBlocking). Now you can reach the third line and use it to open the door.

Not guaranteed it will work, but you can give it a try.
I could just SetLineSpecial(0,0,0) the shootable and SetLineSpecial(ACS_Execute,#,#) the use line. I could see this working! I'll let you know how it does, thanks for the idea!
Last edited by Hindsight2020 on Sun Jan 19, 2014 2:04 am, edited 2 times in total.
User avatar
Hindsight2020
Posts: 261
Joined: Wed Mar 20, 2013 3:29 am
Location: Indiana, USA

Re: Changing Triggers

Post by Hindsight2020 »

cocka wrote:It can only be done in UDMF where you can set more than one activation mode on a line.

Demo wad: (Hexen in UDMF)

updated version:
aktivacio.wad
There's so much that UDMF can do that Hexen Format can't. Ticks me off cause I started this map before I knew about UDMF. Now I'm too far to start over. Way too far. Thanks for the heads up, tho. Everything I do going forward will most certainly be in UDMF.
User avatar
Kappes Buur
 
 
Posts: 4180
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Re: Changing Triggers

Post by Kappes Buur »

DoomRoll wrote: There's so much that UDMF can do that Hexen Format can't. Ticks me off cause I started this map before I knew about UDMF. Now I'm too far to start over. Way too far. Thanks for the heads up, tho. Everything I do going forward will most certainly be in UDMF.
There are several ways to convert your map from Hexen format to UDMFormat.
I recommend METHOD 4, using GZDoombuilder r1744 or later.
User avatar
XCVG
Posts: 561
Joined: Fri Aug 09, 2013 12:13 pm

Re: Changing Triggers

Post by XCVG »

That's handy to know. I've been converting maps by copy/pasting in GZDoom Builder then manually changing all the line specials. Yes, it's horrible. I could never get ZWADCONV or WAD2UDMF to work, mostly because I didn't realize I needed to use both.
User avatar
Hindsight2020
Posts: 261
Joined: Wed Mar 20, 2013 3:29 am
Location: Indiana, USA

Re: Changing Triggers

Post by Hindsight2020 »

OMG how did I not know this? Lol thanks so much for the heads up on that. On vacation now. Will try that first thing when I get home. I'll post my results here.
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: Changing Triggers

Post by cocka »

Converting from ZDoom (Doom in Hexen) format to UDMF format using only GZDoombuilder.
And how do you guarantee that lineids will be OK?

I would recommend this converter:

[wiki]UDMFConvert[/wiki]

The only drawback of this program is that it won't write the indices next to the map elements. Though DB2 or GZDB does that if you modify the map somehow.

When I used wad2udmf it preserved all the lineset_id specials and didn't convert them to line tags and I had to set them again in the editor and as far as I remember some of the action specials didn't work. That's because of the different functioning of some specials.

One example is: soundsequence on a sector..

And of course after conversion there will be a lot of surplus scripts.
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: Changing Triggers

Post by cocka »

But if you want to have your map completely messed up then feel free to use wad2udmf. :D
User avatar
Hindsight2020
Posts: 261
Joined: Wed Mar 20, 2013 3:29 am
Location: Indiana, USA

Re: Changing Triggers

Post by Hindsight2020 »

And of course after conversion there will be a lot of surplus scripts.
Why would there be surplus scripts? Things that can be done in the editor?
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: Changing Triggers

Post by cocka »

Things that can be done in the editor?
Yes, in hexen format.

Examples:

line_setid lines or polyobj_start or explicit lines with lineids

setlinespecial, Line_SetTextureOffset, Line_SetTextureScale, Line_SetBlocking, setlinetexture etc..

and some of the sector action specials: Sector_ChangeSound, Sector_SetCeilingScale(2), Sector_SetFloorScale(2), Sector_SetRotation, Sector_SetCeilingPanning, Sector_SetFloorPanning, Sector_SetColor, Sector_SetFade, Sector_SetGravity, Sector_ChangeFlags, Transfer_CeilingLight, Transfer_FloorLight

Front side only flag -> LineSide

TranslucentLine

and there might be some others but I don't know any more.

Conversation ID for [wiki]ZSDF[/wiki]
User avatar
Hindsight2020
Posts: 261
Joined: Wed Mar 20, 2013 3:29 am
Location: Indiana, USA

Re: Changing Triggers

Post by Hindsight2020 »

Well that's quite a bit. lol I find the sector_SetFade and SetColor very exciting. I can see that making my life quite a bit easier. I'm excited to get back home now so I can try this out. I've come to believe that there is nothing that can't be done SOMEHOW in Doom these days. Keep the advice coming if anyone can think of something.

Thanks again for all of your help!
User avatar
Hindsight2020
Posts: 261
Joined: Wed Mar 20, 2013 3:29 am
Location: Indiana, USA

Re: Changing Triggers

Post by Hindsight2020 »

cocka wrote:
Converting from ZDoom (Doom in Hexen) format to UDMF format using only GZDoombuilder.
And how do you guarantee that lineids will be OK?

I would recommend this converter:

[wiki]UDMFConvert[/wiki]

The only drawback of this program is that it won't write the indices next to the map elements. Though DB2 or GZDB does that if you modify the map somehow.
Having some trouble with UDMFConvert. I found the program and DL'd it but there was no EXE file or anything that I recognize how to use. It's just a Visual Studio project. How do I use this Converter?

Thanks
User avatar
Kappes Buur
 
 
Posts: 4180
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Re: Changing Triggers

Post by Kappes Buur »

If you absolutely must use UDMFConvert, then check this out

http://forum.zdoom.org/viewtopic.php?f= ... rt#p645501
Locked

Return to “Editing (Archive)”