Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Elements needed to creating a bad guy prefab

Discussion in 'Editor & General Support' started by Dano, Feb 26, 2010.

  1. Dano

    Dano

    Joined:
    Nov 7, 2009
    Posts:
    39
    Hi

    I'm just making sure I understand the elements to create a baddie in my game (a game object the player has to kill!)

    My understanding is I'd need the following.

    Prefab with actual 3d model as the child
    Behaviour scipt
    Spawn point
    Prefab for when baddie is killed

    Is there anything else, or somewhere I can learn more about creating this?

    Dan
     
  2. RobbieDingo

    RobbieDingo

    Joined:
    Jun 2, 2008
    Posts:
    484
    Hmm there's so many different way to do this:

    You need a script to control the behaviour of the baddie, fo'sho.

    -You don't necessarily need a prefab, unless there will be more than one baddie in which case a prefab is probably a good idea?
    You don't necessarily need a spawn point, unless you are going to spawn the baddie (this could just be part of the behaviour script?
    You don't necessarily need a prefab for the babbie's death phase, but that's the general approach if you are going to rag doll it?

    - like I said, so many different way to do this - You'll need a gun tho (or maybe a BIG knife?)!
     
  3. Dano

    Dano

    Joined:
    Nov 7, 2009
    Posts:
    39
    Thanks for your input, I'm going to go with a prefab as it lets me create multiple bad guys quickly.

    Yes I plan to ragdoll the baddies death ;-)

    My bad guy is now made up from;

    Prefab
    Child prefab for a gun
    Behavouir script/animations
    Script for the gun he has
    Waypoints to set the area the bad guy patrols
     
  4. Deleted User

    Deleted User

    Guest

    I taught myself to do exactly what you are trying to do from scratch by using a combination the 3D platformer tutorial and the First Person Shooter (I ended up combining AI ideas from both) and it wasn't overly difficult apart from my lacking skills in programming :roll:

    Take a look at what is offered in terms of tutorials and you shouldn't have any troubles.
     
  5. Dano

    Dano

    Joined:
    Nov 7, 2009
    Posts:
    39
    Thanks for the tip, thats the route I had been taking, my first project is going to be such a mixed bag of borrwowed elements and code!..

    Not being able to code is something that is holding me back...guess I need to address that!