Starcraft Icon SC Tutorial

Opening and Closing Doors

Greetings! We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending omgfire points.
  • Post: Give omgfire your thoughts on this Tutorial.
  • Vote: Help omgfire win the Monthly Awards.
  • Rate: Give this Tutorial a rating out of 10.
  • Flag: Alert moderators and warn members of a problem with this Tutorial.
  • Watch: Get notified when this Tutorial is updated.
Mascot

Resistance is futile...

Become a Bananite

Already a Bananite? Login

Opening and Closing Doors

Author: UED77


All triggers about controlling doors are based around the "Set Doodad State" action.

DISABLE: Opens the door, disregarding its initial state.
ENABLE: Closes the door, disregarding its initial state.
TOGGLE: Changes doodad state to the opposite of its initial state. ***USAGE NOT RECOMMENDED***

However, using these commands alone will cause doors to be very buggy. To make sure doors actually work as they are supposed to, use switches. Switches are 1-bit values you can set to be 0 or 1 (cleared or set). All switches are initially cleared. Because of this, there are two separate, albeit similar approches to doing this.

If you have a door that is initially CLOSED, here's what you should do:

Notice the symbols: ‹unspecified variable› ; «specified variable»

TRIGGER: Closing the door
CONDITIONS:

‹player› brings ‹quantity› ‹unit› to ‹location›
‹switch› is «set»

ACTIONS:

«Enable» doodad state for ‹door› for «All Players» at ‹location›
«Clear» ‹switch›
Preserve Trigger

TRIGGER: Opening the door
CONDITIONS:

‹player› brings ‹quantity› ‹unit› to ‹location›
‹switch› is «cleared»

ACTIONS:

«Disable» doodad state for ‹door› for «All Players» at ‹location›
«Set» ‹switch›
Preserve Trigger

==================================================
If you have a door that is initially OPEN, here's what you should do:

TRIGGER: Closing the door
CONDITIONS:

‹player› brings ‹quantity› ‹unit› to ‹location›
‹switch› is «cleared»

ACTIONS:

«Enable» doodad state for ‹door› for «All Players» at ‹location›
«Set» ‹switch›
Preserve Trigger

TRIGGER: Opening the door
CONDITIONS:

‹player› brings ‹quantity› ‹unit› to ‹location›
‹switch› is «set»

ACTIONS:

«Disable» doodad state for ‹door› for «All Players» at ‹location›
«Clear» ‹switch›
Preserve Trigger

==================================================
Because all switches are initially cleared, you should always SET the switch in the trigger that reverses the doodad state. If the door is open, you should SET the switch while you close it. If it is closed, you should set it when you open it. This will guarantee the flawless operation of doors.

Posts

None found

Share

Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share

Credits

Key Authors
UED77
Unknown

Submitter

omgfire avatar
omgfire Offline
Member Joined 10y
753 points Ranked 5855th
7 medals 1 rare
  • 6 years a member Medal icon
  • Became a Club Leader Medal icon
  • One month a member Medal icon
  • 6 months a member Medal icon
  • 1 year a member Medal icon
  • 2 years a member Medal icon

omgfire
Creator
Send a Private Message to the submitter

Category

Details

Difficulty Level
Intermediate Difficulty

Attributes

Miscellaneous
Genre
Other/Misc

Stats

Posts
0
Views
1,523
Date Added
9y
Date Modified
6y

Rating

  • Not yet rated

More Tutorials from omgfire