UnrealScript Tips
UScript Tutorials
« BackTriggering Events by Shooting into a Zone
- Example map: CTF-BT-ZoneShootExample.unr
- Script package: ZoneShotTrigger.u
- Source (GitHub): https://github.com/bunnytrack/ZoneShotTrigger
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?
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
- Import the script into your map (ideally into MyLevel)
- Place an instance of the script in the map somewhere to activate it (Actor Browser > SpawnNotify > ZoneShotTrigger)
- Create the zone(s) you wish to use as zone shot triggers and place a ZoneInfo actor inside them as usual
- In the ZoneInfo actor's properties, set the "Events > Event" tag to match the tag of a Trigger/SpecialEvent/TriggeredTeleporter etc.
- 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