UnrealScript Tips

UScript Tutorials

« Back

Triggering Events by Shooting into a Zone



Ever wished you could use an entire zone like a giant trigger?

So if a player's shot lands anywhere inside the boundary of that zone, an event would happen?

Ever had to create some targets with complex or irregularly-shaped brushes, and found yourself using dozens - perhaps hundreds - of small triggers, painfully laid out to match the shape of your target?

Ouch

Wouldn't it be much easier if you could just make your complex brushes into a target by zoning them off?

This mini tutorial and example map will help you to achieve exactly that.

NOTE: The script only works with shock rifles. If you're using other weapons then you'll need to modify it slightly.

Instructions

  1. Import the script into your map (ideally into MyLevel)
  2. Place an instance of the script in the map somewhere to activate it (Actor Browser > SpawnNotify > ZoneShotTrigger)
  3. Create the zone(s) you wish to use as zone shot triggers and place a ZoneInfo actor inside them as usual
  4. In the ZoneInfo actor's properties, set the "Events > Event" tag to match the tag of a Trigger/SpecialEvent/TriggeredTeleporter etc.
  5. That's it. When a shock rifle shot lands in the zone it'll trigger the actor with the matching tag.

See the example map for clear examples of uses including triggered message, triggered death, triggering a mover, and triggered teleport.

See also: Teleporting Players Between Zones