Difference between revisions of "Ordering and using interceptors and scarabs"
(No difference)
|
Revision as of 15:49, 11 October 2011
Protoss Interceptors and Protoss Scarabs are subunits, or units that are built by and stored in other non-building units. Subunits must use different AI because they function in a vastly different manner from other offensive units. These AIs can be manipulated with triggers to send these units to a location, make them "spray" outwards, or even manipulate the HP of other units.
Contents
Ordering Interceptors and Scarabs
Normally, when Interceptors move out of their host Carrier's range, they quickly turn around and head back. However, this behavior can be circumvented and computer-controlled Interceptors can be ordered to a location using triggered AI scripts. This trick is used in maps like Particles Arena; here are the triggers.
Start by pre-placing computer-controlled Carriers or Reavers in an enclosure. Place an enemy unit in the enclosure with them. The enemy's presence will prompt the computer to create subunits, which you can capture and control. Wrap the entire enclosure in a Location; we will call this location "Spawn". Set up triggers to ally the computer with any other players that may approach the controlled subunits; if you do not, then the subunits will ignore your trigger-based commands and automatically attack the other players.
This optional trigger moves the subunits to an enclosed area (marked by a Location called "Storage") and stops them from moving around. This keeps the Interceptors from flying around while attacking, and keeps the Scarabs from exploding on their targets.
- Computer Player(s) (i.e. Player 7, Player 8)
- Current Player brings at least 1 [Protoss Interceptor or Protoss Scarab] to Spawn
- Move all [Protoss Interceptor or Protoss Scarab] from Spawn to Storage for Current Player
- Run AI script Set Generic Command Target at Storage
- Run AI script Make These Units Patrol to Storage
- Preserve trigger.
This next trigger will order the subunits around. The trigger moves the subunits to their starting position (marked by a Location called Start) and orders them to move to the target area (marked by a Location called End).
- Computer Player(s) (i.e. Player 7, Player 8)
- [Whenever you want to order the subunit.]
- Move 1 [Protoss Interceptor or Protoss Scarab] from Storage to Start for Current Player
- Run AI script Set Generic Command Target at Start
- Run AI script Make These Units Patrol to End
- Preserve trigger.
Remember that the endogenous attack AI script will override these triggers. You can take advantage of this by sending Scarabs into the direction of vulnerable enemies. The Scarabs will ignore their player's AI script, and attack the nearby enemies. This cannot be exploited with Interceptors; they will just fly back to their host Carrier if it is out of range.
Spraying effects
Maps such as Shrapnel Bombers and Shrapnel Wars produce a "spraying effect", where interceptors are seen to diverge randomly outwards. Use the same setup from the last section to spawn (and, optionally, store) subunits, and use this trigger to control their movement. "Start" is the location they should scatter outward from.
- Computer Player(s) (i.e. Player 7, Player 8)
- [Whenever you want to scatter the subunits.]
- Move 15 [Protoss Interceptor or Protoss Scarab] from Spawn or Storage to Start for Current Player
- Run AI script Junk Yard Dog at Start.
- Preserve trigger.
Junk Yard Dog ordinarily causes a player's movements to wander randomly. Interceptors, however, move so fast that if enough of them are used, they will move outward in a random fashion.
As with before, the endogenous AI used by the subunits can be exploited to make the subunits attack nearby enemies. You can also exploit an Interceptor's endogenous AI; simply move its host Carrier out of range and in the direction you wish to send the Interceptor. This mainly requires tedious triggering, as many locations are required if you wish to move your interceptors in different directions.
Direct Damage System
- Main article: Direct Damage System
It is possible to forcibly detonate a Protoss Scarab at any arbitrary location. Scarabs explode when a Move Unit action attempts to move them to unwalkable terrain. These detonations deal splash damage to the Scarab's enemies; it effectively allows mappers to damage a unit without already knowing its health.
Triggers
Assuming you have a location centered on an enemy called "Enemy", and the enemy under the location "arena".
- ???
- Current Player brings at least 1 Scarab to [location: arena]
- Move all Scarabs from [location: arena] to [location: Unplaceable terran]
- Preserve Trigger
- ???
- When you are damaging the enemy
- Move all Scarabs from [location: Storage] to [location: Enemy]
- Preserve Trigger
Notes
The trigger order here is important. For some reason, exploding the Scarab by moving it to an unwalkable area only works after one trigger cycle. Therefore, the trigger that moves it to an unwalkable area has to be positioned before the trigger which moves the Scarab next to the enemy. Because the Scarab is caused to explode, one can use human players! You can also allow Scarab damage to be upgraded, making the spell do more damage.
This system is first described here: Direct damage system thread.
A test map by JaFF is also available: Test map of new DDS