Search Unity

Enemies attacking new networked player

Discussion in 'Connected Games' started by wetay, Aug 31, 2009.

  1. wetay

    wetay

    Joined:
    Aug 28, 2009
    Posts:
    1
    Hi,

    sorry if this is a really noob question but I'm trying to combine the FPS tutorial with the network example.

    Basically, I'm trying to have the hostile robots from the FPS tutorial attack players in the game.

    I've got the hostile robots instantiated with Network.Instantiate but I cant quite figure out how to get them to attack the players.

    What should the variable in the AI script (which is from the FPS tutorial)be for Target? In the FPS tutorial it is First Person Controller, so shouldn't it be Third Person Player? Since every player that enters the game is spawned with that?

    Its really easy with the simple tutorials as the players are already placed in the scene but now their not

    Hope I could get some help with this :(
     
  2. jmunozar

    jmunozar

    Joined:
    Jun 23, 2008
    Posts:
    1,068
    Hello!,

    A quick idea, (hope is what you are looking at :))

    You can spawn characters on the world, and make the enemies (the AI) target the player that is closest to them :)
     
  3. Andre Gregoire

    Andre Gregoire

    Joined:
    Aug 28, 2009
    Posts:
    32
    Here is a great theses on decision making (GOAP),i love AI it's my favorite part of a game.


    Click right here !