Opening and Closing Doors

A Tutorial for StarCraft

Sign up to access this!

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

Embed

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

Credits

Key Authors
UED77
Unknown

Submitter

omgfire avatar
omgfire Joined 11y ago
Offline
769 points Ranked 6704th
9 medals 1 legendary 1 rare
  • 10 years a member Medal icon
  • 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

omgfire
Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!

Game

Sign up to access this!

Category

Details

Difficulty Level
Intermediate

Attributes

Miscellaneous
Genre
Other/Misc

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • Share on Google+

Stats

  • 2.0k Views
  • 10ySubmitted
  • 7yModified

Scores

  • Not yet rated
Sign up to access this!

More from Submitter

More Other/Misc Tutorials

bcp.crwdcntrl.net tracking pixel