12-Jul-2023
The env_sentence entity allows you to make announcements. Tthink of the announcer in Black Mesa from Half-Life's single player mode.
Keyvalues |
Target target : Entity to trigger on sentence start. Trigger use-type is the same as received.
OnDestroy Function ondestroyfn : Name of the function to use from already parsed .as script files when entity is destroyed (killed) in any way. If the function belongs to namespace, you must use prefix with the namespace name (e.g. mynamespace::MyFunction) for the keyvalue.
Name targetname : Set name of env_sentence so other entities can trigger it to play a sentence. Every trigger use-type works uniformly. Multiple triggering will overlap sentences. Can be kill-targeted but sentence won't stop playing until finished.
Sentence _text : Put a space-separated list of WAV-file names from the 'sounds/vox' -folder here, without the '.wav'-extension. Put a period for a pause, e.g. when at the end of a sentence. E.g. "unlocked maximum power.get out of hazard zone immediately".
1 : Activator Only : Announcement will be heard only by player who is an activator of script (e.g. he pressed a button that triggers this entity).
The announcer is audible over the whole map, in full volume, with no stereo or 3D-audio effect in relation to the env_sentence's position.
This can be triggered repeatedly and cause the same sentence to be read out multiple times in one moment.
Unlike other entities, env_sentence sends the same output type as received, instead of 'Toggle'.