Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

i want to make enemy move then wait to fire then move again

Discussion in 'Scripting' started by m-y, May 21, 2014.

  1. m-y

    m-y

    Joined:
    Sep 22, 2013
    Posts:
    470
    hi
    my game is fire game
    i am using tanks as enemy
    i want tanks to move then after 5 secounds stop moving
    then fire on me
    then move again

    any one have idea ?
     
  2. unimechanic

    unimechanic

    Joined:
    Jan 9, 2013
    Posts:
    155
    You should start with the learning resources that we provide:

    http://unity3d.com/learn

    Then plan your game in a document, and ask yourself if you have the knowledge required to solve each feature. When you do, proceed to build the game.
     
  3. m-y

    m-y

    Joined:
    Sep 22, 2013
    Posts:
    470
    Excuse me
    you didn't help me
    what did u say >?
     
  4. unimechanic

    unimechanic

    Joined:
    Jan 9, 2013
    Posts:
    155
    What kind of idea are you looking for? Please explain and we will help you better.
     
  5. m-y

    m-y

    Joined:
    Sep 22, 2013
    Posts:
    470
    i need code for that !

    i want to make enemy move then wait to fire then move again

    code to do that
     
  6. schetty

    schetty

    Joined:
    Jul 23, 2012
    Posts:
    424
  7. chrisall76

    chrisall76

    Joined:
    May 19, 2012
    Posts:
    667
    As for full code-wise, people won't be able to give you the code for your game. Might want to actually spend some time learning about coding. But yea, the waiting would use ether InvokeRepeating or a Courintene.
     
  8. m-y

    m-y

    Joined:
    Sep 22, 2013
    Posts:
    470
    How i can make this clause
    using invoke /.?

    transform.Translate(Vector3.back* 30 * Time.deltaTime ) ;
     
  9. boujlitsalah

    boujlitsalah

    Joined:
    Jun 22, 2018
    Posts:
    1
    إذا سمحت ، هل تعطيني رمز C Sharp لدبابات العدو