
Техническая поддержка: щелкните здесь Starcraft Support FAQ

Can you apply properties (cloaked, irradiated, etc.) with a trigger?
In general, you must set properties on a unit (cloaked, burrowed, invincible, etc.) when you place it on the map or through the "Create Unit with Properties" action. The only exception to this rule is the "Set Invincibility" action, which can be used to set, toggle or clear invincibility for a unit or group of units.
What are switches?
Switches are analogous to Boolean values in programmer parlance. Essentially, they are used to indicate either an "on" or "off" condition. You can use them however you like. They are most useful for preserving state across triggers. You might, for example, set a switch if a certain hero is killed if you want to defer taking action on it until a later time. Then, you could test the state of that switch to see if it was "set" or "reset", even though the event that caused to be set might no longer be detectable.
Is there any way to make triggers with programming language constructs like "if-then-else" or "do-while" loops?
The trigger system is designed primarily for accessibility and does not support higher level programmer constructs directly.
By using switches and keeping in mind that triggers are executed in order, it is possible to do an if-then-else. A do-while is more difficult, but can be done if time is not critical (a single trigger will not fire more than once every 2 game seconds) and the expected number of iterations is small.
What about variables and constants?
There is no support for the allocation of variables or constants in StarEdit. In selecting features to implement in the trigger system, we prioritized those features needed to complete Starcraft's retail campaigns and custom maps.
StarEdit does allow you to modify and reference a single "Custom Score" field for each player. In some cases, this can be used in the place of a variable.
Custom Score related conditions
Custom Score related actions
Score
Set Score
Highest Score
Leader board (points)
Lowest Score
Leader board goal (points)
You can refer to the StarEdit help file for details on any of these conditions or actions.
Why are there only 32 switches?
At the time the trigger system was designed, 32 seemed like more than enough. (And who will ever use more than 640K RAM, anyway?!)
Will future Blizzard Entertainment titles use the trigger system?
No. As with every feature in every game, we view the trigger system as a stepping-stone to bigger and better things. While the trigger system served its purpose, our plan is to provide better and more powerful ways for people to customize our games in the future.
Can I enter triggers in a text file and import them?
No. Using StarEdit's trigger dialog is the only way to create triggers.
How do I get doors to open?
You must use the SET DOODAD STATE action to open or close doors. A typical door opening trigger reads:
PLAYERS: All players
CONDITION: Current player brings 1 or more men to 'Door Location'
ACTION: Disable doodad state for Upper Left Upper Level Door for All players at 'Door Location'
There are several user values for the SET DOODAD STATE action, so here's a quick explanation of each of them:
Set: Select the action you want to do to the door.
Enable - Closes the door.
Disable - Opens the door.
Toggle - Changes the state of the door; closes it if it's open; opens it if it's closed.
Units: First, select "Neutral Units". Then select "Doodads". Among the list of doodads will be the following types of doors:
Left upper level door - A door in "Wall" tiles running from lower left to upper right.
Right upper level door - A door in "Wall" tiles running from lower right to upper left.
Left pit door - A door in "Substructure Wall" tiles running from lower left to upper right.
Right pit door - A door in "Substructure Wall" tiles running from lower right to upper left.
Player: This must be set to "All players". Unlike turret doodads, doors cannot be owned by a specific player. Unless this is set to "All players" the SET DOODAD STATE action will have no effect.
Location: Starcraft will arbitrarily select one door (of the type indicated in "units") in the location. Only that door will be affected by the action.
How do I make installation traps attack?
There are a couple of things which can be confusing about the installation traps:
First, you should be aware that traps have two states: enabled and disabled. Disabled traps will not attack.
- You can double-click on the trap to toggle its state. In the Campaign Editor, enabled traps are readily visible but disabled traps look like normal wall or floor tiles. You can drag-select while in the doodad layer to find any disabled traps in an area.
- Like doors, traps can be enabled or disabled using the "SET DOODAD STATE" action. See the answer on opening doors above for details on using this action.
Second, each trap has an owner; whichever player was selected when the trap was placed is its owner. The trap retains the control properties (neutral / computer / rescue / human ) of its owner. Unfortunately, once the trap is placed there is no way in the Campaign Editor to change or even determine which player owns the trap.
- Human-controlled traps will not attack allies of the human player.
- Rescue traps will not attack but can be rescued by human-controlled units (after which they act like human controlled traps).
- Neutral traps will not attack anyone.
- If a side defeats, its units and traps become neutral, i.e., they will not attack. Since traps do not count as units and the default triggers in an installation map include Condition: "If current player controls 0 or fewer men" Action: "End scenario in defeat for current player", traps placed for a side with a start location but no units will become neutral.
- Players without start locations act like computer-controlled players but (1) do not ally with other computer players and (2) do not run any triggers.
Can I use the "Set Doodad State" action on other doodads like trees and space platform fans?
The vast majority of doodads in the game have only one state. Only the Door and Trap doodads in the installation tileset can be enabled and disabled.
Why can't I create doodads from triggers?
Doodads are part of the actual map terrain, not real units or buildings and can't be changed during the game.

Назад к главной странице
|