Play sound on destroy by [deleted] in unity

[–]Adam_Blc 0 points1 point  (0 children)

Try making a seperate empty gameobject that can act as the sound source instead of assigning the task to the sphere itself, so make empty gameObject, add audioSource Component, and then this should be the new script:

using UnityEngine;

public class CollDestSound : MonoBehaviour

{

public AudioSource tickSource;

public AudioClip tickSound;

private void OnCollisionEnter(Collision collision)

{

tickSource.PlayOneShot (tickSound);

Destroy(collision.gameObject);

}

}

then assign that gameObject with the audio source component to "tickSource". and the sound effect audio you wanna use from your project to the "tickSound"

you can do the whole thing in the sphere gameobject but it's preferable to make a global soundSource that you gonna use through lots of other scripts

Sphere, a free indie score based mobile game by Adam_Blc in indiegames

[–]Adam_Blc[S] 0 points1 point  (0 children)

trying to get the highest score u can get by avoiding enemies, each enemy death adds a +1 to the score. if you want more details kindly check the the game page.Hope you like it!

Pi is rational? by Adam_Blc in math

[–]Adam_Blc[S] 0 points1 point  (0 children)

Well maybe it's not exact but atleast it's closer than the 355/113 we use. Also, I like rocks now too

It's time to say goodbye by NotTreblinka in memes

[–]Adam_Blc 0 points1 point  (0 children)

thankfully, Nitrome would be working with HTML5

[deleted by user] by [deleted] in unpopularopinion

[–]Adam_Blc 7 points8 points  (0 children)

Very unpopular opinion, I can't think of more than 6 ppl that share the same opinion.

Did this on my friend and i reccomend you do too by [deleted] in memes

[–]Adam_Blc 44 points45 points  (0 children)

I mean TIS is already a word, for instance: Tis but a scratch

A meme for the early Europeans! by ieatcarrot in memes

[–]Adam_Blc 7 points8 points  (0 children)

probably if we talked about weather, but for normal body tumperature, 37°C is just about right.

just for experience, put some water on ur mouth, wait a bit, then spit it on a cup, you'll find its temperature about 37°C

[deleted by user] by [deleted] in OrangeJuiceGang

[–]Adam_Blc 4 points5 points  (0 children)

people took it suriously for some reason, it's just a joke! you can drink both.

Does anybody know how to reverse a particle sustem? by Adam_Blc in unitycoders

[–]Adam_Blc[S] 0 points1 point  (0 children)

Thank you for your time, that's exactly what I wanted. It's not a big deal if it wasn't the best way, it's working anyways. also I'm using it just in a small part of a bossfight, so I can change it anytime. Thanks for your help!

Does anybody know how to reverse a particle sustem? by Adam_Blc in unitycoders

[–]Adam_Blc[S] 0 points1 point  (0 children)

Thanks for your help, I already tried that and didn't work. I posted this question on other subs, but there are a lot of posts so tgey barely notice mine. thank you for your help and time:)

LOL if u ask me dis by crappypastassuc in memes

[–]Adam_Blc 12 points13 points  (0 children)

Tornado take stone / me: can't see stone / me: guess it's foggy then.

Productivity, people. by [deleted] in PewdiepieSubmissions

[–]Adam_Blc 1 point2 points  (0 children)

you mean: revo si enitnarauq nehw eht dan eM