Search Unity

Advanced Fantasy AI Tutorials

Discussion in 'Community Learning & Teaching' started by brilliantgames, Mar 27, 2012.

  1. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Important note on help questions: I am very busy with many projects, and I run several threads. However, you are far more likely to get a response by simply sending me a PM right here on the Unity forums. Just specify which package and what your problem is.



    Advanced Fantasy AI Tutorials



    Thank you for choosing Brilliant Game Studios, Advanced Fantasy AI Package. These tutorials will cover the basics of getting your AI setup and ready for your game. Before jumping in to setting up your own custom ai character, it is reccomened you open the mini Game scene and get a feel for how everything works. If you stumbled across this page, and do not know of the fantasy AI pack, find out more on this thread! http://forum.unity3d.com/threads/125753-Advanced-Melee-AI-with-A*-pathfinding. OR PURCHASE ON ASSET STORE HERE! http://u3d.as/content/brilliant-game-studios/advanced-fantasy-ai-pack/2Qt

    NEW! Tornado Twins Video Tutorial!


    Character Setup:




    Navigation:





    Brilliant Game Studios Video Tutorials

    Setting up your AI character Navigation basics




    A Closer Look At Navigation



    more video tutorials are coming soon!



    Trouble Shooting For 2.0

    Destroying AI:
    -If you need to destroy an AI during gameplay, you need to download the destroy AI script. This script ensures that if any other AI's are interacting with the AI you are destroying, no errors will occur. As well if another AI is attacking the destroyed AI or the Destroyed AI is a companion leader of that AI, it will cancel attacking or companion.

    Instructions For Destroy AI Script:

    -Add the "AIdestroy" script to any of the AI's that you want to be destroyed
    -To destroy AI, Get the component of the AIDestroy script. Once you have done this simply say, AIYouWantToDestroy.Destroyai=true;

    https://dl.dropbox.com/u/65183439/Destroy ai/AIDestroy.rar


    Walk Animation:
    -If you are getting errors related to walk animation, that is likely because you have not assigned one. If you don't have a walking animation, either assign your run animation to it, or put an if statement asking if the walk animation exists. This line of code is around line 1190. Replace the line of code "charactermodel.animation.CrossFade( walk.name, 0.15f);" with, "if(walk)charactermodel.animation.CrossFade( walk.name, 0.15f);".





    Advanced Fantasy AI Wiki


    Its finally here! Advanced Fantasy AI Wiki! The Fantasy AI community is growing very fast, and so has the demand for more documentation and information for this massive AI pluggin. So I've cracked! I decided to make a whole Wiki for Fantasy AI 2.0. My hopes with this, is to answer all those questions you may have, as well as make it a smooth and pleasant experience learning and truly understanding how to use Fantasy AI. Feel free to post any requests below!





    The AI Inspector
    In this section I will go over all of variables in the AI inspector. Understanding what all these variables do, will help you to customize your AI for certain difficulties, as well as make it unique. As a side note, you may notice there are a few missing public variables in here. These are ones that are either controlled by the AI itself, or variables made public for other scripts to access that you never need to change.


    Disable Combat Behavor - With this checked as true, your AI will disable his combat and not pursue any of his enemys. This can be useful for civilian type AI or if you just don't want your AI to go into combat at that time.

    Disable Enemy Choosing - With this checked as true, your AI will not sort through his list of enemys attempting to find his next target. This can be useful if you need control over who the AI attacks and when.

    Disable Obstacle Avoidance - With this checked as true, the AI will not attempt to avoid objects tagged as 'obstacles' when they are colliding with the trigger box collider rigged in front of the AI prefab.

    Disable Respawn - With this checked as true, the AI will not respawn after the set respawn time following his death.

    Character Model - The actual animated character/model the AI is using for the visual representation of himself.

    Headbone - The head bone of the Character Model. This is used to control the head controller feature which turns the head of the AI to show is focus and to increase the appearance of intelligence.

    Neckbone - The neck bone of the Character Model. This must also be assigned in order for the head controller to work correctly.

    Facefront - This is a reference for the default front facing direction of the head. It is also to indicate to the user where the front of the AI actually is. Changing the position of this object will change the default direction the head will look when there is no focus.

    Headcontroller - The object that controls the movement of the head. This should already be assigned to the AI prefab so you should never have to change this.

    Charactertag - This is the tag used to indicate to the AI what objects are characters and what are not. The AI uses this to mostly gather information about his teamates and enemys. It is suggested you leave this at default.

    Waypointcollisionlayer - The collision layer for the waypoint objects in the nav-mesh. It is suggested you leave this at default.

    AIcollisionlayer - The collision layer for other AI's and characters in the scene. It is suggested you leave this at default.

    Attackanimations - The list for attack animations that will be randomly selected during combat.

    Run - The running animation.

    Walk - The walking animation.

    Stand - The idle animation.

    Deathanimationspeed - The speed which the death animation will play.

    Runanimationspeed - The speed which the run animation will play.

    Walkanimationspeed - The speed which the walk animation will play.

    Idleanimationspeed - The speed which the idle animation will play.

    Idlesounds - The sounds that will randomly play in time intervals during idle state.

    Alertsounds - The sounds that will play when the AI has first been alerted to an enemy.

    Spotsounds - The sounds that will play when an AI has spotted his enemy and begins charge.

    Huntsounds - The sounds that will play while the AI is looking for his enemy.

    Retreatsounds - The sounds that will play while the AI is retreating from his enemy.

    Askhelpsounds - The sounds that will play when the AI is asking for assistance.

    Deathsounds - The sounds that play when the AI dies.

    Swing - The sound that is played when the AI does melee attack.

    Hit - The sound played when there is a registered hit from melee attack.

    Enablesounds - With this checked false, no sound will play.

    Enableidlesounds - With this checked false, no idle sound will play.

    Enablechargesounds - With this checked false, no charge sound will play.

    Enablehuntsounds - With this checked false, no hunt sound will play.

    Enableretreatsounds - With this checked false, no retreat sound will play.

    Enabledeathsounds - With this checked false, no death sound will play.

    Playidlesoundevery - The time cycle between every time the AI will play an idle sound.

    Dialogrespond - Will play a random 'respond' sound. This is useful for units responding to an order.

    Currenttarget - The current vector of the AI's target. This should never be tampered with.

    Enemy - The current enemy. You can manually assign an enemy to this slot dynamically.

    Gototarget - Where the AI will go/navigate to a specified target while stopping to fight enemy's, then continuing to the target once matters have been taken care of.

    Gototargetnostop - Where the AI will go/navigate to a specified target without stopping.

    Targetlocatto - The actually target assigned for the AI to go to(This is required for 'Gototarget' behavor).

    Runtotarget - Where the AI will run to his target.

    Walktotarget - Where the AI will walk to his target.

    Companion - With this set to true, the AI will be in companion mode. This means he will follow a specified 'Companionleader' and fight with him while staying near him.
    Note: This can also be used when you want an AI to guard a specified object. Example: If you wanted an AI to guard a front entrance and never leave his post, you would place a target node at the front entrance and assign it as his companion leader.

    Companion Leader - The companion leader that must be assigned when Companion is enabled.

    Companionstartdistance - There has been confusion in this area. When an AI is a companion, this is the distance where he will ignore any enemys and attempt to get stay close to his companion leader. Its important that this is set significantly higher than 'Companionstopdistance'.

    Companionstopdistance - This is the closest distance the AI will stay to his companion leader when there are no enemys present. Make sure this is set high enough that he will not try to get too close for comfort!

    Giveupchargetime - The amount of time if takes for the AI to give up charging once he has lost sight of his enemy.

    Giveuphunttime - The amount of time if takes for the AI to give up hunting once the AI has started hunting(often after he has givin up charging).

    Health - The current health of the AI. Do not change this. If you want to change health stats that is all in the health script.

    Unitlist - The list of all units in the scene(This is automatically determined)

    Enemys - The list of all enemys in the scene(This is automatically determined)

    Friendly - The list of all friendlys in the scene(This is automatically determined)

    RunSpeed - The speed which the AI runs.

    WalkSpeed - The speed which the AI walks.

    TurnSpeed - The speed which the AI turns.

    Avoidturnspeed - The speed which the AI will turn to avoid obstacles when using obstacle avoidance.

    Aieye - The transform position in which the vision raycast comes from. This should already be assigned on the AI prefab.

    Viewdistance - The max distance which the AI can see.

    Awarnesspercent - This determines the distance in which the AI will 'sense' an enemy being near. This can be used for an AI 'Hearing' his enemy coming. The percent takes into account how far the AI can see. So if Awarness percent was set to 15 and his vision was 100 yards, he would go into hunt mode when his enemy is 15 feet in proximity.

    Reacttimeseconds - The overall reaction time of the AI. Mostly used for the delay from when he spots and enemy, to actually charging.

    Damage - The damage the AI will inflict with melee attack.
    Note: This should be set to zero if the AI is ranged

    Attackrange - The minimum range for melee attack.

    Attackspeed - The speed at which the AI will attack.

    Findhelponretreat - A neat feature that causes the AI to seek out help from teamates when the odds are against him.

    Cowardmultiply - This determines the point at which the AI will retreat or find help. If it were set to 2, the AI would retreat when the odds are twice against him. This could happen with 2 enemys of equal strength, or 1 enemy of double the strengths ext..

    Retreatlength - The amount of the time the AI will retreat for.
    Note: this does not apply to 'Findhelponretreat'

    Targetdistancestop - The distance in which the AI will stop once he has reached his targetlocateto. (Appologies that this ended up way at the bottom of the inspector)

    Changestate - This is useful for when you want to manually control the states of the AI. By making Changestate to true(make sure to only do it once), this will clear the AI of any current states or focuses he may have at the time.
    Note: When using change state, you must wait one frame before assigning a new state, because if you assign a new state at the same time as changing state, that state will also be cleared.

    Idle - The idle state.

    Charge - The state which the AI is charging at an enemy.

    Runn - The state which the AI is running. This is not the same as charge, because charge occurs in combat while charging at an enemy.

    Walk - The walking state.

    Stopwalking - Will stop the walking state.

    Stoperunning - Will stop the running state.

    Retreat - The state which the AI is retreating from his current enemy.

    Hunt - The state in which the AI is hunting for his current enemy.

    Attackstance - The state that most rarely occurs. This state happens at the moment when the AI has spotted an enemy.

    Attack - The attack state.

    Dead - The death state.

    Respawn - The moment when the respawn occurs once the respawn time has been met.

    Respawnposition - The vector of where respawn will occur. This should not be changed.

    Respawntarget - The transform position of where you want the AI to respawn.
    Note: If neither a respawn target or 'Respawnatstarposition' are assigned, the AI will respawn where he died

    Respawntime - The amount of time it takes for respawn to occur.

    Respawnatstartposition - If enabled, the AI will respawn at his start position which he stores at the start of the game.







    Path Patrolling
    Setting up for patrol path is easy. This feature is a great way to make your AI appear as if they are doing something, or giving them a set of tasks they need to go to(This can work great for death-match type behaver, where the AI goes around collecting weapons items).



    1. The patrol path script should be located near the bottom of your public inspector for your AI. To start, 'Enablepatrol' must be checked to true.

    2. You will see two more options below 'Patrolwalk' and 'Patrolrun'. Choose one of these depending if you want your AI to run or walk between nodes.

    3. Now you must give him a path. The best way to do this, is by going into the 'Navigation' folder in the Fantasy AI folder, followed by dragging in a 'target node'. These are used for each point in his path. Drag as many points as you need and form a path for him to follow.

    4. When you have finished making a path, drag each node from the heirarchy into the 'Patrolpoints' list in the public inspector, in the order of which you want him to follow the path.



    Note: If you have properly set up Nav-mesh Navigation in your scene, the AI will actually pathfind to each one of these nodes. This means you could very well get away with having as little as 2 nodes for a complex path. As well, take note that once the AI has reach the final node on his path list, he will backtrack to the beginning and start over.
     
    Last edited: Jul 23, 2013
    AlainIsana and jebi like this.
  2. CrashKonijn

    CrashKonijn

    Joined:
    Mar 4, 2010
    Posts:
    245
    wouldn't it be better to just have an array with sounds? So there's an unlimited amount of sounds possible :)

    Nice tutorial btw and I really, really like this package! But if I where you I would pay a little more attention to the pictures of your tutorial, its not that hard to make nice straight red lines instead the to obvious paint/mouse made ones ;-)
     
    AlainIsana likes this.
  3. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    That is a very good point about the array. Not sure why I didn't do that. I will have to do that for the next update!
     
  4. BruwtForce

    BruwtForce

    Joined:
    Mar 17, 2012
    Posts:
    23
    Can the AI be on multiple teams? For example, say you had three tribal villages - Team A, Team B, and Team C for sake of argument, where Team A attacks on sight anybody from Team B and C, but B C only attack Team A as they have an alliance; however, the alliance is temporary and unstable, so Team B would need to be (at that time) on both Team B and Team C. Basically, does it operate in the same way as a layer mask? If not, that would be a neat addition.
     
  5. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    The AI's make lists. Enemys and Friendlys. Right now there is no "allies" feature. But it wouldnt be very hard to control something like this through simple scripts. You could add or remove enemys from a unit or other multiple units. Cause the lists only update when someone actually changes a team(that is, if you have the "dynamic teams' checked off, otherwise teams are solid from the start), and it is only the one who changes a team, who tells everyone else that he is now their enemy or friend. Which means you can really make anyone attack anyone or stop attacking anyone at any time. :)
     
  6. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    New tutorials posted! Detail on how to fully setup your AI for pathfinding!
     
  7. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Tutorials updated! Many more are on their way!
     
  8. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Tutorials updated! Plus a new video tutorial posted. Many more tutorials are on their way. Sorry for the wait everyone!
     
  9. cybershead

    cybershead

    Joined:
    Feb 12, 2012
    Posts:
    44
    Love the AI, even got it to work but their is so much to learn, like killing the enemy off when they die etc, how long before you make more video tutorials?


    Cybershead
     
  10. ivomarel

    ivomarel

    Joined:
    May 4, 2012
    Posts:
    6
    Hey I set up the characters, by following the tutorial, however the teams don't seem to function. Only adding the two game-objects to each other in the 'Enemy'-Transform, they would actually attack each other. Could this have to do with the fact that my tags were also not automatically imported with the package? I use Unity 3.5.1 on Mac OSX.
     
  11. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Yes, tags and collisions layers are very important. Make sure all the children of your character model have the right layer and tag as well.
     
  12. Liong Cheng Chung

    Liong Cheng Chung

    Joined:
    May 28, 2012
    Posts:
    1
    Hi I'm having hard time setting up the navigational mesh. I testing your navigation mesh in new scene. To keep thing simple, I'm using the provided prefab "Guard Blue" for the testing. I added a cube with Navmeshtarget script attached and drag the object to "Guard Blue" Targetlocateto property, checked "Gototarget" property, setup 1 wall (just a simple cube with box collider and mesh renderer), setup waypoints (using your waypoint prefab) and ensure they are all linked and form a path around the wall with the "Guard Blue" and navmeshtarget on different side of the wall. When I hit play, I did see all the navmesh detected each other and form the path correctly on the ground in the Scene view. But the "Guard Blue" totally ignore these path and run toward the Navmeshtarget in straight line, as a result the "Guard Blue" hit the wall and continue running without using the path. I tried remove all the waypoint from the scene and hit play again, the "Guard Blue" still doing the same thing, running toward the target in straight line, it seem that the "Guard Blue" is ignoring the waypoints. I keep comparing my test scene with your Navigationalmeshnavigation scene and I can't find what is missing on my side. Please advise.
     
  13. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Did you have "Navmeshnavigation" checked off on his navigation? Cause if you did, he will only pathfind if he is colliding with waypoints. If you want to use Navigational mesh style navigation, your waypoints have to be solid all around your level, NO GAPS. Otherwise you should use, "Waypointnavigation". Hope that helps. :)
     
  14. kgilmore

    kgilmore

    Joined:
    Jul 2, 2012
    Posts:
    3
    I'm having an issue with teams. When I set the AI to opposing teams they do not attack my custom AIs only the pre made ones that came with the system. Any advice?
     
  15. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Did you follow the video tutorial? For an ai recognize another, each must have a 'character' tag, the character collision layer, and must have all the scripts, team, health, ai, navigation.
     
  16. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    New tutorial for version 2.0!
     
  17. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    New help added. Trouble Shooting :)
     
  18. Venged

    Venged

    Joined:
    Oct 24, 2010
    Posts:
    500
    @ Brilliantgames

    Using the AI prefabs I can set up AI players with any of my models and use there animations.

    I am not able to get my own model to work as the Player. I have checked that I have every script that is on the Player prefab that comes in the package. Nothing seems to work. The camera will scroll but the player with not respond to WASD controls:(

    could you please add a tutorial for using your player controller that is in this kit?

    Could you add a Player prefab for the controller that all you have to do is drag your model on to it and add animations similar to how you have the AI prefabs setup?

    Any advice will be appreciated.
     
  19. Kergal

    Kergal

    Joined:
    May 10, 2012
    Posts:
    14
    Hey Robert i was just about to hit the donate button when my game built returned this





    I am using the AIDestroy script .
    I tried GetComponent<AIDestroy>().destroyai=true;
    I tried this line of code in 2 different spots. first in the health.cs if(dead) if(ai) -> here.
    after realizing this wont work. I tried it in ai.cs if(dead) -> here.

    i get the same errors.


    In my scene I have several AIs in 2 teams . Team 1 consists of one single AI team 2 consist of 4 AIs . Those 4 AIs win without a loss. and those winning ai produce the error.
    What am I missing?

    Besides this little complication- of which I am sure it is 100% my fault :) I am very happy with 2.0 and the donate button is waiting for me to spank it badly ;)



    Just to make sure


    http://s7.directupload.net/file/d/2973/5j3l6t7r_png.htm
     
  20. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Hey Kergal. This script only covers for the AI's, are there any other scripts running accessing the AI's? Are you testing in the mini game? Try making a new scene and dragging AI's into it, change some of their teams, then try destroying them.
     
  21. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    I actually just made a fix to this script. When I tested this script, I was testing it in a brand new scene. I then tested it in the mini game and had errors. This is because some of the objects that are 'enemy's or 'teammates' didn't have AI scripts. Those objects were the crystal and the portal. So I made a fix for when this happens. :) Its already updated.
     
  22. Kergal

    Kergal

    Joined:
    May 10, 2012
    Posts:
    14
    Hey Robert, though I wasn't using your example scene - you actually helped me. I added a reference which was called permanently and by destroying the object ..well.. I got an error.

    I like your pack.
    I will donate tonight. ;)
     
  23. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    NEW VIDEO TUTORIAL BY TORNADO TWINS!

     
  24. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
  25. Dragoworks

    Dragoworks

    Joined:
    Jan 12, 2012
    Posts:
    16
    Hey There!
    Really great package so far! I just can't stop playing around with it..

    But tell me, is there a way to enable random behaviour for, lets say, animals to just stray around on randomly generated terrain?
    I didnt really get a guard or skeleton to do that.

    Thanks in advance.
     
  26. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Have you messed around with Patrol?
     
  27. Dragoworks

    Dragoworks

    Joined:
    Jan 12, 2012
    Posts:
    16
    Hi there,

    i tried to, but with many animals i could imagine setting random patrol points at random terrain could get a bit heavy on the cpu, right?
    Otherwise i'll take a better look at it.
     
    Last edited: Aug 19, 2012
  28. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Why dont you just make prefabs of the animals with the target nodes attached to the prefabs...That way, you could make a script that instantiates the animal with the target nodes when the player is close enough.. Doing this, you can have infinite amounts of AI's in your map that all patrol when they spawn..
     
  29. marcus_aggrippa

    marcus_aggrippa

    Joined:
    Oct 4, 2012
    Posts:
    10
    Sorry to intrude, but I am having the same problem
    new scene two teams
    as soon as the last member of one team is destroyed (it does not vanish) you get the error
    can you please help ( I downloaded the aiDestroy 3rd October)
     
  30. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    I will take a look ASAP, if there are any problems I will upload an update!
     
  31. khkw79

    khkw79

    Joined:
    Oct 8, 2012
    Posts:
    8
    Hi~ your AI script is great help to me !!! thank you!
    so I want to replace existing player model with my own model~ is it possible? and also Could you add jump animation to player character test? please do me a favor~
    Sorry weak in English
     
    Last edited: Oct 8, 2012
  32. Nomad5oul

    Nomad5oul

    Joined:
    Aug 18, 2012
    Posts:
    24
    @brilliantgames

    Please can you do a video tutorial to setup the player character with Advanced Fantasy AI v2.0 as FPS instead of 3rd person?

    Also how do I know what the physics layer collision matrix should be? Please can you post a screenshot of the matrix settings I should use?
     
    Last edited: Oct 11, 2012
  33. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Yes it is very possible. You can use any player controller you want. All the AI need is a teamscript, healthscript, and the character tag, as well as the character collision layer.
     
  34. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Yes this is something I will do as soon as possible. And I do not believe you will ever need to change the matrix from the default.
     
  35. StnGame

    StnGame

    Joined:
    Oct 26, 2012
    Posts:
    1
    Hi there,

    I'm having problems regarding the navigational mesh and was hoping you could assist. I put down the mesh as shown in your tutorial videos, scale it and tag the ground ect (no problems there). I build the mesh and it avoids all targets like it should, copy the mesh while still in play and delete and replace it with the copied mesh once play has been stopped. I uncheck 'Build Navigational Mesh' and check 'Bake'. All other settings appear to be the same as in your tutorial video.. I hit play and I get these debugs and then nothing else, 1st) Connecting Waypoints... 2nd) Removing singled out waypoints...And then nothing else happens.

    Any advice would be greatly appreciated :)

    Awesome package by the way, very glad we purchased this!
     
  36. RGreulich

    RGreulich

    Joined:
    Oct 29, 2012
    Posts:
    19
    I am strongly considering purchasing this soon. Can you make a FPS view with this instead of third person? If so, are there videos that show how it works in that view?
     
  37. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937

    When you watch the mesh build, do you see it subdivide into sections? Or is there simply nothing? Remember this navigation system builds around colliders, so if there are any invisible triggered colliders in your scene those count too.

    The view has no effect on how the AI behaves. Although this AI package does include a player ready to go, this is an AI package, not a character controller package. It does not matter what character controller you use, all thats required for an AI to interact is the health and team script attached, as well as the correct collision layer.
     
  38. Fufurata1234

    Fufurata1234

    Joined:
    Jun 6, 2009
    Posts:
    47
    Hi,
    Is there any way to use Unity's built-in pathfinding or any third party pathfinding solution, instead of abhominable one, you provide? It is a shame to ship such pathfinding "solution" in 21st century! Not only the whole S***ty thing is based on waypoints, which may be good for racing game, but not for RPG, but user is forced to manually place waypoints (that is some S***ty cubes) on the scene! So, if there is no way to use a normal pathfinding - this is quite useless.
     
    Last edited: Nov 15, 2012
  39. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Hey Fufurata. First I want to say, that the language and lack of professionalism in that post was really not necessary...

    Of course it is possible to use Unitys pathfinding in this AI... But it would require modification of course. All you would really need to do, is make a script that figures out whatever the AI's current target is. Then input the target position into Unitys navmesh, then output the path back into the AI..

    That being said, I have spent alot of time making documentation for this package. It is hard to cover everything that a human brain can think of.

    Have you not heard of my new pathfinding solution that is almost done? Its completely dynamic and exceeds Unitys navmesh in many ways.

    Dynamic AI: http://forum.unity3d.com/threads/154639-Dynamic-AI-Project
     
  40. MortalMan

    MortalMan

    Joined:
    Nov 6, 2012
    Posts:
    25
    For one reason or another the prefab characters do not appear unless I'm right next to them less than 1 meter away. I can hear each character just fine, but they render in the test player.

    I press play, I notice I can see a tree I placed about 100 meters away in the background, but I can't see the prefab archer 2 meters away!
     
  41. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    There are some problems with the CharacterCulling script with Unity 4. For now you can just remove the script. I may have to do an update, cause it seems Unity 4 messed a few things up.
     
  42. MortalMan

    MortalMan

    Joined:
    Nov 6, 2012
    Posts:
    25
    That's good to know, but I should have mentioned I'm using Unity version 3.5.6f4.
     
  43. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Oh okay. Well you should either remove the Character Culling script, or simply change the distance..
     
  44. murteas

    murteas

    Joined:
    Feb 14, 2012
    Posts:
    62
    Just picked up the package from Gameprefabs. If you do release an update where will it be available for gameprefab customers?

    Looks great so far.
     
  45. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Yes. Tornado Twins email you a download link I believe.
     
  46. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Is it possible to set up flying waypoints/paths/AI for the enemies/NPCs to move in the air? I.e. some flying monkeys or flying ships that fight in the air.
     
  47. dell

    dell

    Joined:
    Aug 12, 2008
    Posts:
    24
    I just bought your Fantasy and Nav product and well it is great! Having fun using it and well anyone thinking about this should just buy it. Of course you have to read the docs and watch the videos to get a real feel for it.

    But I do have a question. Everything is running nicely in my scene... but when I bring in the Female Warrior as shown in the 1st tutorial video... I put her on a team and place her animations in correctly... but she does move towards the other characters but her animations do not trigger even though I specified them in the inspector.. It looks pretty easy in the video and I am following it exactly... but it is clearly some obvious user error on my part.

    Any idea how I can fix this?

    P.S. I am running Unity Pro 4.01
     
    Last edited: Jan 28, 2013
  48. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937

    Did you assign the "Character"? If so, you may have assigned the wrong prefab. Some characters have multiple prefabs with the same names. Should be the main parent.
     
  49. Bluie

    Bluie

    Joined:
    Nov 14, 2012
    Posts:
    8
    I bought your Fantasy AI and well, it is very nice! Anyone thinking about this should just buy it.

    I was puttting a other character model inside the player prefab and it was working, then i disabled camera and wanted to use Smoothfollowoneaxis and the whole model sank, so it is now standing to the waist into the terrain, and it move it to x 114 from x 1140 without reason. It dosnt matter now if i use original camera script or not.

    So I have a question. Can i rebuild it from some other empty prefab or i need to use the player prefab. It seams that this player has uses a other setup then the empty AIprefabs, with Attackrange, Attackrange2, Attackrange3.

    I could not use the prefabs as they where, i needed much smaller ones and some other proportions, is that the problem? I dont have a nav mesh yet setup, could that be a problem?

    Hope i could get some info about how to setup the player model and also how to setup a monster fish, i.e. a model without gravity to hunt the player (human).

    Thanks anyway, this is anong the best things i bought in assetstore.
     
    Last edited: Feb 12, 2013
  50. DragonHunter

    DragonHunter

    Joined:
    Mar 4, 2013
    Posts:
    2
    Hello,

    Not sure if you are following this thread still but i have a problem with the nav mesh. It will not break up into littler ones and form around my colliders. Please help me.

    Thanks

    $Problems.jpg