Help with doors!

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.
Locked
User avatar
Kappes Buur
 
 
Posts: 4181
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Re: Help with doors!

Post by Kappes Buur »

You could set a variable like so ...

Code: Select all

#include "zcommon.acs"

int switch = 0;

script 1 (void)
{    
    while ( switch == 0 )
    {
    ... do the switch and door stuff
    
    switch = switch + 1 ;  // now increment switch to prevent another activation
    }
}
User avatar
GuildNavigator
Posts: 209
Joined: Mon Oct 20, 2008 2:42 pm

Re: Help with doors!

Post by GuildNavigator »

I put this script but didn't work.. it says: "Invalid Identifier". These are my first steps in scripting.. does the mistake refer to the word "switch" in particular? Should equalize the word "switch" to, for example, the sector supposed to be the trigger? Or maybe something else?

Thanks!
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Help with doors!

Post by NeuralStunner »

GuildNavigator wrote:does the mistake refer to the word "switch" in particular?
Yes, it's a reserved word for the Switch/Case decision block. Name it DoorSwitch and you should be good to go.
User avatar
GuildNavigator
Posts: 209
Joined: Mon Oct 20, 2008 2:42 pm

Re: Help with doors!

Post by GuildNavigator »

I did it!!! :D Thanks Neural Stunner!

(sorry for the incontinent happiness..)
Last edited by GuildNavigator on Mon Sep 12, 2011 6:02 am, edited 1 time in total.
User avatar
GuildNavigator
Posts: 209
Joined: Mon Oct 20, 2008 2:42 pm

Re: Help with doors!

Post by GuildNavigator »

Hi everybody... I'm back with another question.

I made a switch that activates something, with a specific script. The trigger texture must change (for example the switch lightens), but I do not know how to do. I searched in the action specials but didn't find anything.. or so I think.
What should I do?

Thanks in advance!
User avatar
GuildNavigator
Posts: 209
Joined: Mon Oct 20, 2008 2:42 pm

Re: Help with doors!

Post by GuildNavigator »

Hi there!

Finally I had enough time to conitnue building my wad. But during the making of a secret door, something got wrong. I uploaded the beta-level for you to have a look directly to the problem. ---> http://oron.com/cw6p4y2ftjt1

The problem is quite simple: in order to open a secret door, you have to press use in the front part of the pillar just forward the secret door itself. In the level it's before the octagonal room (do you see that the upper part of the pillar has an artistic edge?); the script that activates the trigger is script 3: I think there's nothing wrong in it, but when I try to use front line as the trigger of the door, the texture of the wall-door just lower of few units :( and nothing opens.
The door is supposed to raise by units I explained in the script, and the pillar used as trigger should instead lower by certain units.

Maybe some of you know the answer to this banal error...

Oh yes: the set of textures used in this wad is GOTHICTX.WAD

Thanks in advance! :D

PS: ignore the previous answer in the thread, but if you eventually would like to answer, I'll like the interest!; the level itself just got started so I have to do many modifications to door, triggers, brughtness, etc.
User avatar
Kappes Buur
 
 
Posts: 4181
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Re: Help with doors!

Post by Kappes Buur »

GuildNavigator wrote:The door is supposed to raise by units I explained in the script, and the pillar used as trigger should instead lower by certain units.
Something like this ?

Image

Code: Select all

script 3 (void)
{
 Floor_LowerByValue (10, 5, 128);
 Ceiling_RaiseByValue (10, 3, 4);
 TagWait (10);
 Pillar_Open (11, 8, 64, 64);
}
And, please, do yourself and us a favour. In future use Mediafire.com for uploading snippets like that. Having to wait 2 minutes for downloading will not endear you to people who would like to help you.
User avatar
GuildNavigator
Posts: 209
Joined: Mon Oct 20, 2008 2:42 pm

Re: Help with doors!

Post by GuildNavigator »

Thank you very much Kappes Buur, I think to have understood what should be done in case like this.
Not properly what I wanted as final result, but this works as I wanted.

Well, I never considered using Mediafire.com as good host site: from now on I'll upload my files here. Thanks for the suggestion.. ;)

I must say I have another problem that probably could be solved anyway, or maybe not... It sometimes happens during the making of a level, and I do not know if it's really important fixing it or not, because during the test of the level this doesn't bring graphically any wrongness.
Well, I use Doom Builder 2, and sometimes it happens that in 3D mode I cannot see anymore the textures (ceiling and floor) of a sector, like in the image below.

Is THERE some strategy able to "fill" the sectors lines with the textures used before or not? And most of all (if the sector doesn't need to be raised or lowered anymore) does this bug mean a real problem or I can simply leave it as it is?

Thanks in advance, as usual! :)
Attachments
SectorBug.JPG
SectorBug.JPG (63.04 KiB) Viewed 577 times
User avatar
GuildNavigator
Posts: 209
Joined: Mon Oct 20, 2008 2:42 pm

Re: Help with doors!

Post by GuildNavigator »

Uhm... I just discovered that remaking a new sector on the same vertices the problem disappear... I can suppose this is what I wanted.

At first I thought to delete the previous post about this, but eventually it can even be useful for people with the same doubt. ;)
User avatar
GuildNavigator
Posts: 209
Joined: Mon Oct 20, 2008 2:42 pm

Re: Help with doors!

Post by GuildNavigator »

Hi there!

I have another important question for you. How can I make 3D floors moving up and down like moving platforms? I'd like to make a wooden block get lifted by some chains.. :D

Thanks in advance!
User avatar
Tapwave
Posts: 2096
Joined: Sat Aug 20, 2011 8:54 am
Preferred Pronouns: No Preference
Graphics Processor: nVidia with Vulkan support

Re: Help with doors!

Post by Tapwave »

GuildNavigator wrote:Hi there!

I have another important question for you. How can I make 3D floors moving up and down like moving platforms? I'd like to make a wooden block get lifted by some chains.. :D

Thanks in advance!
Make a script that makes the ceiling and floor of the control sector move at the same time to the desired heights.
User avatar
GuildNavigator
Posts: 209
Joined: Mon Oct 20, 2008 2:42 pm

Re: Help with doors!

Post by GuildNavigator »

terranova wrote:Make a script that makes the ceiling and floor of the control sector move at the same time to the desired heights.
Thank you very much! It does work :)
User avatar
GuildNavigator
Posts: 209
Joined: Mon Oct 20, 2008 2:42 pm

Re: Help with doors!

Post by GuildNavigator »

Hi there! ...sorry to bother you again... :roll:

I have another question: is there a specific function in order to make change the texture of a specific wall in another one?
For example with ChangeFloor you can do the same thing with the floor-sector you want; so I mean the same thing with a line, maybe using a specific ID of the line itself..
I searched in the functions' list but it seems to me there's nothing about it.. or maybe I've searched bad.

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

Re: Help with doors!

Post by Kappes Buur »

User avatar
GuildNavigator
Posts: 209
Joined: Mon Oct 20, 2008 2:42 pm

Re: Help with doors!

Post by GuildNavigator »

:shock:
(thanks..)
Locked

Return to “Editing (Archive)”