ItsMods
[Tutorial] Trigger Radius, Pingplayer and Ambient Sounds - Printable Version

+- ItsMods (https://www.itsmods.com)
+-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html)
+--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html)
+--- Thread: [Tutorial] Trigger Radius, Pingplayer and Ambient Sounds (/Thread-Tutorial-Trigger-Radius-Pingplayer-and-Ambient-Sounds.html)



Trigger Radius, Pingplayer and Ambient Sounds - Yamato - 07-27-2011

Good evening

Another tutorial(I am bored), lol. This time is about trigger radius, pingplayer and ambient sounds.

Trigger Radius is a object that is a invisible sphere. T.radius way of calling them is:

Code:
spawn( "trigger_radius", position, spawn flags, radius, height )

About flags, I dont know how does that work, so I will put on 0, an example of trigger radius could be:

Code:
trigger = spawn( "trigger_radius", self.origin, 0, 40, 10 );

You can use a few commands with them:

Code:
trigger.angles = (0,0,0); //angles trigger setContents(1); //make it solid self waittill("trigger", player); //detect when player touches it, I think...

Now, Ill tell about ambient sounds, ambient sounds are those sounds that play on maps, like rain on underpass for example, its use is:

Code:
ambientPlay("ambient name you want to give", time to wait before ambient plays)

An example:

Code:
ambientPlay( "ambient_mp_desert" , 0.5);

You can also use this command to stop the ambient:

Code:
ambientStop( time to wait before ambient plays )

Example of stop:

Code:
ambientStop( 1 );

Now, Ill talk about this command, pingplayer, what it does is to update player minimap icon with a red "!" icon, like in quickmessages, this command can be usefull for example when you want to show an event, SnD planting for example, Big Grin

Code:
self pingPlayer();

Thats all, Tongue