516083025 by Unknown
Author:Unknown
Language: eng
Format: epub
So, the grenades work quite well; however, it would be great to add a sound effect for the grenade, when they are thrown and when they explode, and we will do that just now:
Please open the script
Add the following lines at the beginning of the script (new code in bold).
extends KinematicBody
export (PackedScene) var grenade
export (AudioStream) var sound_grenade_launch:AudioStream
export (AudioStream) var sound_gun :AudioStream
In the previous code we create two variables sound_grenade_launch and sound_gun that will be accessible through the Inspector.
You can save your script, switch to the 3D workspace, select the node player in the Scene and look at the you should now see two new placeholders, as per the next figure.
Please locate the file grenade_launch.wav in the FileSystem window, and drag and drop it to the empty field to the right of the label Sound do the same for the file gunshot for the field to the right of the label Sound as per the next figure.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Harry Potter and the Goblet Of Fire by J.K. Rowling(3071)
Unfinished: A Memoir by Priyanka Chopra Jonas(2918)
Never by Ken Follett(2905)
Machine Learning at Scale with H2O by Gregory Keys | David Whiting(2310)
The Man Who Died Twice by Richard Osman(2305)
Fairy Tale by Stephen King(2083)
Will by Will Smith(2059)
Rationality by Steven Pinker(1773)
The Storyteller by Dave Grohl(1666)
The Dawn of Everything: A New History of Humanity by David Graeber & David Wengrow(1576)
The Dark Hours by Michael Connelly(1574)
The Stranger in the Lifeboat by Mitch Albom(1544)
Cloud Cuckoo Land by Anthony Doerr(1446)
New Morning Mercies: A Daily Gospel Devotional by Paul David Tripp(1369)
Friends, Lovers, and the Big Terrible Thing by Matthew Perry(1342)
The Becoming by Nora Roberts(1337)
Crying in H Mart by Michelle Zauner(1326)
Einstein: His Life and Universe by Walter Isaacson(1320)
A Short History of War by Jeremy Black(1304)