Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Pelle1986

Scripting a Door

Recommended Posts

How do I make a door open with help of a switch? I would like to do this by scripting. What line action do I use? I have used action number 80 (player presses use, script number 1. In the script editor i wrote this:

#include "zcommon.acs"

 

Script 1 (void)

{

Door_Door (1,16);

}

 

The sector tag is set to 1

 

Thank you!

Share this post


Link to post
On 2017-03-23 at 2:35 AM, everennui said:

Give the switch a line action of 80 then use Door_Open

Door_Open (tag, speed, lighttag)

Script 1 (void)
{
Door_Open (1, 16, lighttag); (only use light tag if you want to change the light)
}

https://zdoom.org/wiki/Door_Open
https://zdoom.org/wiki/Category:Door_specials

Thank you, I tried this. The switch is activated but the door remains closed. 

Share this post


Link to post

That should be working, assuming everything is right. Switch set to line action 80, script number set to 1, player presses use, repeatable (if needed), door sector set to tag 1.

 

Dumb question but I assume the door is set up like a normal one right? Opens from the floor and raises to 4 below the lowest neighboring ceiling?

Share this post


Link to post
On Friday, March 24, 2017 at 11:22 PM, Nevander said:

That should be working, assuming everything is right. Switch set to line action 80, script number set to 1, player presses use, repeatable (if needed), door sector set to tag 1.

 

Dumb question but I assume the door is set up like a normal one right? Opens from the floor and raises to 4 below the lowest neighboring ceiling?

Yes that is right. I just cannot find what is wrong. Could it be because I am makeing a hexen map???

Share this post


Link to post

I belive no scripting work at all. I just copied this script from "A quick beginner's guide to ACS"

 

#include "zcommon.acs" script 1 ENTER { print(s:"Hello World!"); }

 

... and it did not work either.

 

Is there anything I must do in the first place to make the script work? Should I save it in a special file? Give it a particular name? Format?

Last time I got a error-message (that I did not get earlier) saying "Including nesting too deep" NESTING? Ok, my English is bad but isn't that something a bird would do? :-D

Share this post


Link to post

You said you're in Hexen format?

I wonder if you don't have the library in the folder. This seems strange.

Why don't you link the map?

 

Share this post


Link to post

Thanks for your patience!

I uploaded the map and I hope you can help me. Yes, it is a hexen map, ZDoom (Hexen)

Test.zip

In this map I forgot to set the sector tag back to 1 but it doesn't matter if it is 1 or 0, it does not work anyway :-(

Share this post


Link to post

http://www.mediafire.com/file/21nyeh3otv4pq5p/testredo.wad

^^ Try that. At least I know it works on my end. If that doesn't work for you, my guess would be that you don't have the zcommon.acs flie in the correct folder.

Add this file:
http://www.mediafire.com/file/0jj4vpd55ifi3yh/zcommon.acs

To your C:\...\...\GZDoombuilder\Compilers folder

If that doesn't work, I don't know what to tell you. :/

compile.png

I didn't have the textures that you were using so I had to retexture everything in glorious Ashwall.

Edit: Actually, I don't know if that'd work anyway because GZDoom should use it's own compiler when your test it. I'm stumped. You aren't the first person that I've come across that couldn't get something to compile. Maybe try UDMF format?

Edited by everennui

Share this post


Link to post

Okey, I tried the "redo" you did, but it didn't work. I came so far that the switch was "activated" or "lit up" but the door was still closed (otherwise then there is a error somewhere, the switch doesn't work at all). 

The zcommon-file you linked was something I did not have. So I added it to the map according to your instructions.

The maps I create I save in a map on the desktop. Should I save them elsewhere?

I understand that you can't waste all your time by helping me. But I am very beholden for that you have tried to clear up my problems.

Anyway... Can you please tell me a little bit about UDMF? How do I begin?

(I am sorry for my bad English)

Share this post


Link to post
3 hours ago, Pelle1986 said:

(I am sorry for my bad English)

You have no reason to apologize, your english is better than some of those who speak english natively.

 

3 hours ago, Pelle1986 said:

The maps I create I save in a map on the desktop. Should I save them elsewhere?

Yes, do not save them to the desktop. Also, do not use C:\Program Files or C:\Program Files (x86).

Save them in a separate folder, ie C:\HEXEN\MyPWADS\ or whatever you feel like is a good name.

 

3 hours ago, Pelle1986 said:

Anyway... Can you please tell me a little bit about UDMF? How do I begin?

https://zdoom.org/wiki/Universal_Doom_Map_Format

Basically it is Hexen format on steroids.

You can convert a Hexen format map to UDMF with GZDoom Builder-Bugfix.

See https://forum.zdoom.org/viewtopic.php?f=39&t=52726

GZDoom Builder-Bugfix can be found at https://devbuilds.drdteam.org/gzdbbf/

 

And my try of your map:

Test2.zip

 

 

Edited by Kappes Buur : added link to GZDB-Bugfix

Share this post


Link to post

Okey, this will be a challenge. I will look into it. I return when I need more consulting. Thank you very much!

Share this post


Link to post

You can extract them anywhere you want. How about C:\GZDBBF\...

...or you can extract them into your previous build of GZDB and it should replace everything. (provided you click, "replace")

Then you click, "builder.exe" and then you're done. Honestly, your map is so small that it'd probably just be easier to remake it from scratch (instead of converting it (which is easy enough)).
 

Share this post


Link to post

Okey, I will try this. Thanks for your help. Is scripting going to be as before? Just open the script window?

And what will happen to my old maps/scenarios?  

Share this post


Link to post
On 3/23/2017 at 1:13 AM, Pelle1986 said:

Script 1 (void)

{

Door_Open (1,16);

}

In Doom, you can stop and close a door while it is opening. Can you do the same even with this script?

Share this post


Link to post

I am not sure if I know what you mean. Do you mean that i should tell (by scripring) the door to open just by taging the sector?

Share this post


Link to post

What a mess!

I downloaded that "bugfix" and now I got even more bugs and errors. I took some print-screens. Now I can't edit a Hexen map anymore, it is simply not an alternative when I choose to create a new map (se screenshot) and I get a bunch of errormessages when I start up Doombuilder (se next screnshot). Panic! What should I do??

Doom builder.jpg

Error.png

Share this post


Link to post

From the file paths on your pictures, it looks like you've installed GZDoom Builder into a Doom Builder 2 folder (and presumably overwritten a part of DB2's resources by GZDB's ones while leaving other DB2's resources in there). GZDB is not a DB2 addon, but a standalone editor, so you should put it into its own folder. Also, Program Files is not a good location where to install Doom editors or ports, some operating systems automatically make files in this folder read-only and many Doom related utilities can't cope with it, you should prefer installing stuff elsewhere.

Share this post


Link to post

I understand. I reinstalled Doom Builder 2 and put it in a separate map (not in Program Files) Now I can manage my Hexen maps again. But now, all of a sudden, I can't make "polyobject" anymore and I have made those so many times that I am sure I did not do anything wrong. Still when I try to (in this case) open my swingdoor, the game shuts down and I receive this errormessage. I am so confused!!

Error2.png

Share this post


Link to post
56 minutes ago, everennui said:

How many poly doors do you have in your map? 

I think I figured it out: There were two different Polyobj anchor/start spot etc. One under the category named "other" and one under "ZDoom". When i chose the respective items under "other" it worked as it should. 

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×