Overly complicating things with a door?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
::Bloodfury::
Posts: 316
Joined: Mon Aug 01, 2011 7:39 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Finland

Overly complicating things with a door?

Post by ::Bloodfury:: »

So,

There is probably a lot easier way to achieve what I am after. But here goes.
I am trying to create a door that consists of multiple sectors, with scripts and sectorlinks.
Yeah currently it works fine. But the issue is that it does not function like a regular door in doom.
As in if player hits the door as it is closing it won't return back up. :D

I tried fiddling around adding an if statement to check the Ceiling height but well.. I could not get it to work.
If anyone could point out to me where that statement should go, or how this kind of door should be coded
overall so that it bumps back up if it hits the player, or any other thing for that matter.

This is the frame with what I am working on.

script "doortest" (int CeilTag, int SilenceTag) { SoundSequenceOnSector(CeilTag, "doornormal", SECSEQ_INTERIOR); SoundSequenceOnSector(SilenceTag, " ", SECSEQ_INTERIOR); Ceiling_RaiseByValue(CeilTag, 16, 84); Delay (64); SoundSequenceOnSector(CeilTag, "doorclosenormal", SECSEQ_INTERIOR); SoundSequenceOnSector(SilenceTag, " ", SECSEQ_INTERIOR); Ceiling_LowerByValue(CeilTag, 16, 84); }

I tried messing around with sectorlinks with just regular door functions but they did not work.
If there is a simple way to create multisectored doors, please point me towards them! :D

THX in advance for anyone willing to help. :)
User avatar
::Bloodfury::
Posts: 316
Joined: Mon Aug 01, 2011 7:39 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Finland

Re: Overly complicating things with a door? (SOLVED)

Post by ::Bloodfury:: »

Hello everyone.

Managed to solve this problem by using sector set link. One must create a dummy door and then create your door that consist from multiple sectors with different heights.
The dummy(control) door must be built and set like regular doors in doom. Consisting of just one sector etc. Now when you link your complex construct to it, one can create
cool doors without overly complicated scripts.
Post Reply

Return to “Scripting”