Greetings everyone!

I wonder if there are anyone out here that has some advanced AI scripts done with Makinom and willing to share?

What I am looking for mainly something like this:

# Patrol AI (Moving between patrol points) with the possibility to hunt and attack if a player is detected

# Hunt AI (The AI moves to a point where he saw a player object last time and moving around looking in the area around that point

# Get Help AI (Running to a predetermined place or a specific NPC target and calling for help around that area (where you can set the area size) and have those monster react to the request for help and follow the initiator back to the last spot where the player was seen.

# Cautious Attack AI (ie not just rushing and attacking the player but instead, slowly moves into position and maybe rotating around the target and lunge attack when being on the sides and behind instead of front)

I would love to have this as schematics to use in Makinom and then use the plugin and have it together with Ork Framework.

With this said you will understand that scripting isn't my strongest point, designing is more my strongest points. However just by doing the first survival shooter tutorial I have learned alot and I will make sure to do the rest of them as well.... this has already shown me the true potential of makinom even though the tutorials doesn't go into the deep yet.

Thanks in advance!

/Thrilled
  • dont need examples just use check distance and check angle this will do everything you need so if distance is equal or less than 10 or what ever you need the distance to be do this if failed do this.. have to think of how you want your ai to do things mainly ai is nothing but checks so think of it in terms of ok so player is close enough to this what do we want them to do. an go from there...
    new website can be found here http://www.fore-loregames.com

    Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games

    or check out the face book page here https://www.facebook.com/ForeLoreGames
  • Will add tutorials for this in the future - as wtyson said, it's mostly checks for distance (and angle if you want to do on sight, can be combined with raycasts to check if something is in between).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited June 2015
    Thanks to both of you...

    I fully understand that this might be really logical for people that know a bit about scripting, but considering that I in about 1 month ago never ever had done anything when it comes to game making and just some DOS and simple VB scripts at the most then there have been ALOT to learn. In this you as a community and GIL have been a truly invaluable source.

    The tutorials or example are for me to get a grip around the logic behind it... I can easily say that now just by doing the shooter tutorial I have learned ALOT and especially when I have done something wrong somewhere and doing some troubleshooting around it. I spend a good hour and a half just to figure out why my character wasn't shooting... and after quite some time following the flow with the schematics which linked to a tagged machine and then follow that tag which linked to another schematic etc etc then I finally found out that I had missed to change the node where the damage was applied to MachineObject instead of FoundObject. This process was invaluable! Would I have been able to create this without the tutorial in the first place? Most likely not... Will I be able to do this now? With some lookbacks at the tutorial now and then sure.

    These are to give an idea on what can be done... and the above requests was in my point of view a good start to build around.. cause I will most likely not end up there but make quite alot modifications around it as well.

    So with this said I am truly looking forward to your tutorials as well GIL, and meanwhile that is released any kind of input is valuable. For example I am getting a bit insight with the raycost sofar (hopefully more then I have done the other tutorials as well), however angle is totally new for me sofar..

    So to conclude - I am not the fastest horse in the stable, but I have ambitions and I need some basic learning on how to sprint in general and then I can take my time to develop my skills and technique to become faster ;) Then we will see how this 40 year old donkey breed will end up :D

    Thanks!

    /Mikael
    Post edited by thrilled on
  • edited June 2015
    using raycast in ai is a good idea if you want to implement line of sight. so for example you want to see if the player is the hit target from the raycast. it would go something like this..

    from raycast node connect to a check object(think thats the correct name.. in middle of pc upgrade so dont got unity to look at at the moment)

    check object on success:: if found object = player then set nav destination to player
    on failed :: do nothing which means failed would be connected to nothing...

    when doing angle you would do something like this...

    check angle in a 90 (or any angle really does not need to be 90.. an not needed if you want a 360 degree field of view)degree angle of machine object on success :: if found object = player set nav destination to player
    on failed do nothing

    you can also do a connection like this so you can check distance an angle to make sure
    player is with in a certain distance an in field of view of the enemy

    do a check distance of 5 units an off success connect it to a check angle node an on success there set nav destination to player

    on failed do nothing..

    then any time you need to chase the player create a local bool to stop the other mechanics such as random wandering ect... make sure at start its set to false an when player is detected you would set to true an at the start of any event that handles wandering or any kind of pathing you would have a check variable node to check if the bool is true or not..

    but this time instead of connecting to the success slot we leave it empty an connect the failed to the next node since we want to keep patrolling or what ever till that bool is true an runs success


    this should give you a huge head start with ai from just this bit of information you can do pretty much anything ..
    Post edited by wtyson on
    new website can be found here http://www.fore-loregames.com

    Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games

    or check out the face book page here https://www.facebook.com/ForeLoreGames
  • not trying to be mean by saying this but i dont believe when dealing with ai its a good idea to follow peoples tutorials unless there the basics of how to do things. good ai comes from what you create your self other wise you will end up with a copycat system that dosent do what you really want to do. one of the reason why i stay away from things that are prebuilt as much as possible... ai can be tricky but a few days experimenting will show you a world of results. an will give you a bigger grasp of how things are done then any tutorial. like i did the shooter tutorial an expanded from there. i did ask for some advice on which nodes would be best for which even then i still ended up building my own system with makinom which didnt use those nodes ( sorry gil wasted your time).. but int he end i now have a system thats very well made an does exactly what i want it to do.. an is expandable... not to mention my boss thinks its perfect.. i think the hard part you will run into is adding animations in an how to work with them so that they will do what is needed at certain times.. but once you learn the ins an outs of that part you will know what needs to be done an when..
    new website can be found here http://www.fore-loregames.com

    Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games

    or check out the face book page here https://www.facebook.com/ForeLoreGames
  • wtyson - thanks alot for your precious input here...

    And I am not sure if I was unclear earlier but it's exactly what you said that I meant... I need the tutorials only to get the basics.. Since those basics will leave a foundation to build on..

    In my case I want the boss fights and other stuff to be as exciting I can make them and that's another part of the ai which I will most likely use Ork for (when I have bought it which will be next week). In my vision I would like the same bossfight to be a possible different experience the first 4-5 times you meet him. So by fighting him once doesn't mean that he will behave the same the next time you face him. This is the vision I have for it.

    For example.... so you can see what I mean with an example of just a "simple" patrol:

    The patrol consists of a goblin ranger and his wolf companion. They roam around a predetermined amount of patrol points, this however means that on a random basis they can either choose a.) follow the patrol points in a specified order b.) roam between those patrol points randomly. They will react on suspicious things and having a wolf among them will give them the benefit of accute hearing(here I was thinking of adding variables that determine the hearing range depending on what gear the player is wearing and bonuses attached to that depending on class ie a rogue get's a decrease on that range and skills like sneak will improve it even more. So now lets say we have the player in distance of the wolfs hearing but not visible to the player/wolf.. this would trigger the wolf to howl and this will alert the goblin... now they change state from patrol mode to seek mode. So they move to the point where the wolf heard something and from there they spread out and search the surrounding area (here I was thinking of finding some way to spawn random generated patrol points within a specified area around the wolf/goblin object). If they spot the player by any chance that will trigger the hunt/follow mode and attacking once in distance. However it doesn't end here depending on what personality (another variable) I have set on the object it will also decide whether he will fight until death, fight until low health and then try to flee to get help or flee to get help directly when they spot hte players.

    So there you have the idea where I want to come with the AI for just a "simple" patrol unit. So having the base tools will not let me "copycat" but instead let me have the foundation that I am missing.

    So now you gave me one more tool regarding the angle which I will dive deeper into once I have done the tutorials first.

    Once again thanks for you help!

    /M
Sign In or Register to comment.