07-27-2011, 18:15
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:
About flags, I dont know how does that work, so I will put on 0, an example of trigger radius could be:
You can use a few commands with them:
Now, Ill tell about ambient sounds, ambient sounds are those sounds that play on maps, like rain on underpass for example, its use is:
An example:
You can also use this command to stop the ambient:
Example of stop:
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 Big Grin](https://www.itsmods.com/forum/images/smilies/biggrin.gif)
Thats all,
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 Big Grin](https://www.itsmods.com/forum/images/smilies/biggrin.gif)
Code:
self pingPlayer();
Thats all,
![Tongue Tongue](https://www.itsmods.com/forum/images/smilies/tongue.gif)