The Game Modding Community - Since 2001

Opening and Closing Doors

A Tutorial for Starcraft

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 6486th
8 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!
Sign up to access this!

Category

Details

Difficulty Level
Intermediate Difficulty

Attributes

Miscellaneous
Genre
Other/Misc

Share

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

Stats

  • 1,980 Views
  • 0 Posts
  • 10y Submitted
  • 7y Modified

Scores

  • Not yet rated
Sign up to access this!

Hey, you! Mascot

GameBanana is one of the oldest mod sites on the net. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation - send modders points.
  • Post: Give modders your thoughts on their work.
  • Vote: Help your favorite modders win monthly awards.
  • Rate: Rate mods and help them stand out.
  • Flag: Alert moderators and warn members of problems with mods.
  • Watch: Get notified when mods are updated.

Sound fun? Sign up now!

Already a Bananite? Login

More from Submitter

bcp.crwdcntrl.net tracking pixel