Updates to my Skybox Portal Reign Game

Rob, Your right I thought the same thing it would be a good feature but that game can do without it. When I learn how to build it I will build it as an option for the player to use Thank you :slight_smile:

Give it a whirl in a separate project, just use simple GameObjects to represent the ship, you don’t need fancy models. Work on the basics. Then when it’s solved, move the technique and approach into your game.

Will do at the moment I want to complete a app I’m working on. Then I will start teaching myself Git. I Beleive portal reign is playable now yes for the meanwhile

Next month when school refund comes I will buy assets from Daz3D it going to be a awesome ftp game you will see the game. I following is udemy zombie game but I will make mine the second realm to portal reign realm investigation.

I currently working in fl studio on some beats we will chat soon pal :nerd_face:

Does Ben and Rick teach a ftp game with unity or unreal? I’ll take that class instead the class I’m in now is complete but very little feedback and the instructors don’t respond :frowning:

FTP?

Yes, do They teach a class with characters walking and shooting?

I think you means FPS (First Person Shooter).

The Unity 2D course has a section called Zombie Runner, it’s going to be remastered in due course and then moved to the Unity 3D course I believe.

Silly me FPS correct Okay I will look into it where do I search for it where in Unity? I will start it to day. In fact this is the game I paid $32 for in Udemy do you
know the course because the instructors do not respond. I rather receive responses.

?

?

Struggling to understand you responses Martin. When you reply via email could you cut your signature out too, makes your replies even harder to follow, especially as the signature is displayed before you response?

Not Unity I paid $32 from a Udemy class called Dead Earth

These are the Instructors

Game Development Training, Accreditation, Certification

I provide a screen shot should I stick to this class?

That’s up to you Martin

Hi Rob, are you busy?

Hi Martin, always :slight_smile:

I hope that is a good thing for you. I have a question about some code for adding a laser sound to my guns do you have time to look at it? :slight_smile:

  • List item

I added the laser sound to my guns when I add the script to them I receive no error message but the sound only starts on awake but not when I shoot, also the laser guns automatically shoot when I start the game I like to fix this? Any insight is appreciated.

using UnityEngine;
using System.Collections;

public class LaserSound: MonoBehaviour
{

    public AudioClip Laser;
    private AudioSource source;
   

    void Awake()
    {

        source = GetComponent<AudioSource>();
    }


    void OnCollisionEnter(Collision coll)
    {
      
        
    }

}

Hi Martin,

In your screenshot you have Play on Awake enabled which would be why your Audio Clip plays immediately. In your code you get a reference to the AudioSource but then don’t do anything with it, which is why nothing else happens.

You would ideally disable the Play on Awake and then add code to trigger the playing of the audio clip based on user input.

Be aware that one challenge you will have is synchronising the particles with the audio. For example, if the player just holds down the fire button at the moment they just get a constant stream of particles, unless you’ve changed this since I saw that last. You’ll probably want to refine the rate of fire for the emitting of particles and the speed/duration of the audio so that they are synchronised.

Note, you have already covered how to emit particles and play audio based on player input in the Project Boost section, for all intents and purposes this is the same, the particles are just coming out of the front instead of the back. Project Boost didn’t have the synchro icity issues that you’ll have with this those.

Hope this helps :slight_smile:

I knew about the play on awake. I will change the rate of emissions and the speed/duration of the particles.
I look up how to add code to trigger the playing of the audio clip based on user input. Thank you :slight_smile:

Okay, I got this so far but still can’t get the laser sound to play when I shoot. I also created a game object for the laser sound and added to each gun. Any feedback is appreciated :slight_smile:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class LaserSound : MonoBehaviour
{

    public AudioClip Laser;
    private LaserSound source;

  
    void Awake()
    {
        source = GetComponent<LaserSound>();
    }


    void OnTriggerEnter(Collider other)
    {
        LaserSound LaserSound = other.gameObject.GetComponent<LaserSound>();
    }

}

What actually is it you are trying to achieve? Are you trying to make a sound play when the particle(s) collide with something, or, are you trying to make a sound play when the player presses fire?

I’m trying to make the sound play when I press fire.

Privacy & Terms