Activatebysector
activatebysector <sectNum> <spriteNum>
This command either triggers all ACTIVATOR sprites (tile 2) contained in the sector with the specified index, or if none are found, activates the effect defined by the tag of that sector.
Note that unlike operateactivators it does not trigger ACTIVATORLOCKED sprites (tile 4).
Arguments
- <sectNum>: Either a gamevar or constant. Refers to the sector index whose effects (ACTIVATOR sprites contained within, or tag if none found) are to be activated.
- <spriteNum>: Either a gamevar or constant. Only used if no ACTIVATOR sprites are found. In this case, the purpose of this value is defined by the sector tag:
- For sector tags
{9,16,17,18,19,20,21,22,26,27,28,29,30,31}
it refers to the sprite id that serves as the origin for the sound played by the sector when its effect is activated.
- This requires a MUSICANDSFX sprite to be present in the same sector. If set to -1, the origin will default to the MUSICANDSFX sprite.
- For sector tag 15 (ST_15_WARP_ELEVATOR), it refers to the player sprite that is to be transported. If the sprite does not refer to a player (i.e. picnum is not 1405), the effect will not occur.
- For sector tags