Advanced AI Scripting help Needed
by Michael Roberts 13 · in Torque 3D Beginner · 01/13/2015 (3:09 pm) · 17 replies
Hey Everyone I'm Back with a NEW Profile because of a sign-in Issue.Anyways off too business.The AI Needs to be like the Marines & Covenant AI.Meaning The ally AI follow you and protect you from enemies and fire if there is any in sight.Whereas the enemy AI Attack you on sight and some stay in groups to attack while some can even drive tactically.BTW I'm not using any Kits.I want a specific Script and need some advanced help.
Thanks in Advance GG Community,
Michael Roberts
Thanks in Advance GG Community,
Michael Roberts
About the author
13 year old teen,n00b scriptor but skillful in 3d artists.Gamer 4 life
#2
01/13/2015 (6:06 pm)
Did Mich accidentally nuke this kid's account? Cause none of his old posts are showing up for me either.
#3
01/14/2015 (4:51 am)
I am trying to get the Improved AI Guard Unit resource to work in newer versions of T3D to help you along. I'm having trouble getting the AI to equip weapons but hopefully I can work on that tonight.
#4
01/14/2015 (12:57 pm)
Thanks for the help
#5
In the package is:
Improved AI Guard Unit by Twisted Jenius
AI Marker Editor by Twisted Jenius
Friendly AI Marker by Maximillian Brewer
(which is based off Improved AI)
I should mention that AI Guard Unit was originally made by Mark Holcomb.
I finally got these to work in Torque 3D 3.5 but it should be fine in 3.6.
Instructions and Credits are included in each folder. Friendly AI Marker is included just to try to modify it. It creates an NPC that you can place on a path.
Improved AI Guard Unit and AI Marker work together but you can simply use just Improved AI and alter it's dynamic variables for each ai marker you create. It's pretty clunky and makes me glad I purchased UAISK which would do exactly what you want out of the box. With this you can get used to Torque 3D by creating some levels with some action.
Basic AI Kit Download
01/14/2015 (11:17 pm)
You said you weren't using any kits oh well. I put one together.In the package is:
Improved AI Guard Unit by Twisted Jenius
AI Marker Editor by Twisted Jenius
Friendly AI Marker by Maximillian Brewer
(which is based off Improved AI)
I should mention that AI Guard Unit was originally made by Mark Holcomb.
I finally got these to work in Torque 3D 3.5 but it should be fine in 3.6.
Instructions and Credits are included in each folder. Friendly AI Marker is included just to try to modify it. It creates an NPC that you can place on a path.
Improved AI Guard Unit and AI Marker work together but you can simply use just Improved AI and alter it's dynamic variables for each ai marker you create. It's pretty clunky and makes me glad I purchased UAISK which would do exactly what you want out of the box. With this you can get used to Torque 3D by creating some levels with some action.
Basic AI Kit Download
#6
01/15/2015 (4:30 pm)
THIS IS AMAZING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!thanks guys this should help alot
#8
01/15/2015 (10:31 pm)
Very cool. Though simple, it can be made to be a challenging opponent.
#9
i Didn't Tried This.
If It Works Should I Download All 4 Resources From Here ?
Thank You
MR. Jason Campbell for Giving This Page Link And These Resources
02/15/2015 (8:28 pm)
Is It Worked For You Brother ?i Didn't Tried This.
If It Works Should I Download All 4 Resources From Here ?
Thank You
MR. Jason Campbell for Giving This Page Link And These Resources
#11
02/27/2015 (6:27 am)
I have a simple AI that works fine except from Dedicated server. The AiPlayer and AiVehicle just jerk around on the landscape. I have tried every fix I know but the animation just fails. Anyone have this issue can help solve it?
#12
02/27/2015 (9:01 am)
can you post the code?
#13
03/06/2015 (3:10 am)
Hi, I just downloaded and used this, very cool. Thank you. A couple things- Once I made the changes to get the script file working, all the health for the players and for the bots just... disappeared. Now no health is seen or registered. I am sure I can figure it out however a pointer or idea would be nice. Second, when I used it to place the soldier everything worked fine. When I made a new ai player datablock and used the boom bot the ai players would jerk around a bit once in a while.
#14
From the original notes by twisted jenious I saw this:
"The AI may have issues detecting the new "Soldier" model. It is recommended that you use "Gideon" for both the player's and the AI's model."
Just checked it with BoomBot and yes the AI does jerk around seemingly when acquiring a lock on my character. I don't really know what to advise on that.
03/06/2015 (4:48 pm)
The health issue must be the changes in /scripts/server/player.cs perhaps get a fresh player.cs and redo the changes from the Install notes?From the original notes by twisted jenious I saw this:
"The AI may have issues detecting the new "Soldier" model. It is recommended that you use "Gideon" for both the player's and the AI's model."
Just checked it with BoomBot and yes the AI does jerk around seemingly when acquiring a lock on my character. I don't really know what to advise on that.
#15
Yes I saw that as well. I changed the model to see what will happen with other models. It really is not a good resource if it is just the "Gideon bot" lol. I personally was not concerned about the boombot jerking around, I was more concerned about the health issue. The soldier model works perfectly for me by the way. I will be testing the alien tonight. After that I will test a self generated model.
Mine jerks around randomly while executing moves, in the "guard" duty. while walking or attacking fully it is fine. This makes me think it has to do with the turning section of the script, or the random turning section. Note I have not yet looked at the ai script yet, just browsed through it quickly, so this is a guess. But it seems while doing the random turn it does that, perhaps a custom modification to the movements for this model will change that. I will see. It does work though.
I will be on ai for a while so I will keep updating this or create an updated thread. Thanks again for the resource. For a quick dirty AI, especially for a guided type level so far this is very functional.
03/07/2015 (2:35 am)
Thank you for the reply, it is appreciated. After I posted the problem I realized I really had not even really looked at it logically. I replaced the code in the player.cs with the backup and now it works. I will be playing around with it a lot in the coming weeks, so if I can replicate it I will post the results.Yes I saw that as well. I changed the model to see what will happen with other models. It really is not a good resource if it is just the "Gideon bot" lol. I personally was not concerned about the boombot jerking around, I was more concerned about the health issue. The soldier model works perfectly for me by the way. I will be testing the alien tonight. After that I will test a self generated model.
Mine jerks around randomly while executing moves, in the "guard" duty. while walking or attacking fully it is fine. This makes me think it has to do with the turning section of the script, or the random turning section. Note I have not yet looked at the ai script yet, just browsed through it quickly, so this is a guess. But it seems while doing the random turn it does that, perhaps a custom modification to the movements for this model will change that. I will see. It does work though.
I will be on ai for a while so I will keep updating this or create an updated thread. Thanks again for the resource. For a quick dirty AI, especially for a guided type level so far this is very functional.
#16
03/07/2015 (7:33 am)
No problem. I just want to note again this is not my resource. It is by Twisted Jenious who also made the UAISK which is a much bore robust kit but you are absolutely correct, the Improved Guard is great as a quick and dirty prototyping AI not as a solution though can be made to be I'm sure with a lot of work. :)
#17
03/07/2015 (9:09 am)
The issue where the unit will "twitch" when reaching the end of a "move to location" is ancient and annoying. I have mitigated it somewhat by increasing the %unit.mMoveTolerance to 2.0 or 3.0, but it still happens sometimes.
#18
OK, thanks Richard, it is a move based thing then? I will try those changes and see how it works out. The odd thing to me is the soldier moves fine for me. Never twitches.
03/08/2015 (9:57 am)
Yes I know it is by Twisted Jenious. I looked at and into the UAISK too. I have just now discovered the Bad behavior Tree based AI which I think looks cool as well. OK, thanks Richard, it is a move based thing then? I will try those changes and see how it works out. The odd thing to me is the soldier moves fine for me. Never twitches.
Associate Steve Acaster
[YorkshireRifles.com]
If you want an Ai to go somewhere it's %name_or_ID.setMoveDestination(%position);
Look in TDN (you have to press the log in button bu that's it) you might find something. tdn.garagegames.com/wiki/TDN_Home&needLogin=1