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

AI 4 Enemies

Discussion in 'Assets and Asset Store' started by Hummelwalker, May 22, 2011.

  1. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
    I sort of "fixed" this by simply removing SmoothFollow.js, but I assume it's needed. :p
     
  2. Hummelwalker

    Hummelwalker

    Joined:
    Oct 28, 2010
    Posts:
    119
  3. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
    For the ShootingExample script, how could I use this:

    Code (csharp):
    1.  
    2.             if (Input.GetButtonDown("Fire1"))
    3.             {
    4.                 // Apply fire code here
    5.             }
    6.  
    With a GUI button instead of Fire1 (for iOS)? For example (in JS)

    Code (csharp):
    1.  
    2. var buttonX : Button;
    3. function Update()
    4. {
    5.     // Check for Fire
    6.     if ( !buttonX.IsFingerDown() )
    7.         canFire = true;
    8.    
    9.     if ( canFire  buttonX.tapCount == 1 )
    10.     {
    11.         // Apply fire code here
    12.     }
    13.    
    14. }
    15.  
    Also, how could it be turned into automatic fire by tapping and holding?

    I'd need to modify this for your .CS script to get firing to work on iOS, but am less familiar with code. I'm hoping it's simple. Thanks for your help!
     
    Last edited: Sep 10, 2011
  4. Hummelwalker

    Hummelwalker

    Joined:
    Oct 28, 2010
    Posts:
    119
    @Xander Davis: Hi Xander, I sent you a pm.

    Carsten
     
  5. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Hi. I'm starting to play around with this and have managed to get two models to work nicely but the third I tried goes to the waypoint and spins in place. Any idea why that would happen?
     
  6. Hummelwalker

    Hummelwalker

    Joined:
    Oct 28, 2010
    Posts:
    119
    @drewradley The shortest way is that you send me your test project. I sent you an eMail :)
     
  7. GameFreak

    GameFreak

    Joined:
    Oct 31, 2011
    Posts:
    13
    Hey I was gonna buy this just a few questions first.

    Is it fully functional with iOS? (Not the smooth follow script I have my own but the AI part like speed will be okay?)

    2ndly I would like to know how does this go about with enemy health? Like enemies attacking the player and causing damage is okay. But player attacking the enemies. So enemies have a fixed health and stuff?
    Thanks in advance.
     
  8. Hummelwalker

    Hummelwalker

    Joined:
    Oct 28, 2010
    Posts:
    119
    Hi GameFreak,

    every enemy has his own health which you can control by variables. It's easy and flexible.

    I'm not a mobile developer, so I cannot anwer your first question. But no customers reports me about problems :)
     
  9. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Hi,

    I have updated the code so that it supports an Alt Hit animation (not required) as well now. I think could be quite useful for various scenarios, but in general, more than hit animation is quite nice.

    If you would like me to send the code over, im more than happy to, otherwise if you feel its a worthy addition it would be great to see it in the next release.
     
  10. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    I just try out the links to the demo of ai 4 enemies and they all send me to the ai driver toolkit demo wich is not what i want.

    Any news about an update for this tool?
     
  11. Hummelwalker

    Hummelwalker

    Joined:
    Oct 28, 2010
    Posts:
    119
    @mimminito: I'll think about it!

    @RandAlThor: Holy ...! Thanks for this info. I will change this as soon as possible! At the moment I'm not on my PC but I'll do this when I'm bake!

    To the Update question: During the last months I had a lot of work regarding other Unity projects. Now I have time to think about new features (like the second hit-animation slot ;) )
     
  12. Hummelwalker

    Hummelwalker

    Joined:
    Oct 28, 2010
    Posts:
    119
    The AI4Enemies Demo is back. Thanks for the info ;)
     
  13. imrod2

    imrod2

    Joined:
    May 21, 2012
    Posts:
    4
    one question

    if the player escapes that happen? as the enemy returns to its original position?
     
  14. Hummelwalker

    Hummelwalker

    Joined:
    Oct 28, 2010
    Posts:
    119
    @imrod2: At first the AI tries to follow the player. If the player is to fast, it patrols at this new position "and waits for the player". You can see it in my demo scene which you can find here: http://www.seifert-engineering.de/ai-4-enemies/
     
    Last edited: Jul 7, 2012
  15. mohydineName

    mohydineName

    Joined:
    Aug 30, 2009
    Posts:
    301
    Hello!

    I d like to achieve the following, can you tell me if your package would be suited for this purpose?
    Basically, I d like the same behavior as the tanks in Tank Hero.
    I'd summarize as follows:
    -Enemies are long range shooters primarily
    -Some enemies are close range attackers
    -NPC are able to patrol along multiple waypoints,
    -NPC Avoid obstacles
    -NPC Avoid shoots from players/enemies (would be awesome!)
    -Enemies follow players until player is out of reach/sight then come back to waypoints
    -Priority based attacks (eg some units are more important to kill than others)

    No need to be deterministic, I love the random AIs
    No need to handle Unity's Animation system, I prefer to make my own.
    No need to handle non moving units, I do them on my own

    I am probably missing a few points but that is the idea.

    Please let me know !

    Thanks

    Stephane
     
  16. blurededge

    blurededge

    Joined:
    Mar 14, 2012
    Posts:
    255
    Okay Hummelwalker, I'm going to put the ball in your court here, I need you to advocate for your own product. I'm deciding between which product to use and so far as I can tell, AI for enemies is being fairly radically outperformed by Advanced Fantasy AI 2.0. The AFAI, has much better pathfinding (the pathfinding in your demo is very blocky), a built in navmesh generator, the flexibility to have an agent switch between melee and ranged combat and a setup tool that makes setting up AI agents very easy, and handles teams right out of the box. Also, it costs slightly less than AI for enemies. I'm sure your AI has many virtues as well, so could you tell me about them or are you really just being outperformed by your competition?
     
  17. Gogs

    Gogs

    Joined:
    Aug 15, 2012
    Posts:
    8
    WIll there be any more updates regarding AI4Enemys, im intrested in buying but would like to see more options
     
  18. BL00DCELL

    BL00DCELL

    Joined:
    Jan 27, 2013
    Posts:
    22
    I think the last update broke the tool. it used to work and following the tutorial video I can't figure out what is wrong with it. the ai ch fails to see the target
     
  19. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Just bought this, very nice, but is there a way to stop the character deviating from the way point so much? im trying to get a guy to walk in a perfectly straight line along my way points but he deviates so much it isnt at all straight..
     
  20. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    hey guys, sorted that - is there a way to use this without needing an animation? for example i want to move a simple 3d ship object that ahs no idle anim, but im getting an error when i try.
     
  21. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Has this now been removed from the Asset Store? I cant find it anymore...
     
  22. Soumikbhat

    Soumikbhat

    Joined:
    Nov 23, 2013
    Posts:
    110
    Bump...Same issue..

    Why is this being removed so frequently from the asset store?