Independent bots using AIPlayer in latest CVS HEAD
by Alex \"bathala\" Rufon · in Torque Game Engine · 11/17/2002 (2:03 am) · 3 replies
Hello guys,
This post is related to an earlier post of mine.
I have been trying to get the bots working on for my mod Tabukan and stumbled into a problem which I cant figure out how to fix.
What I basically want to do is to create NPC's or bots which would do it own thing without intervention from the player. I can actually make the bot move around but everytime it reaches its destination ... it stops and ... it just stands there. I know this is logical ... but I want to be able to make a list of thing that it can do and make it do so one after the other.
Currently, I was thinking of hooking into the main program loop but I'm considering that as the last option. Hmmm. Is there a way that the system (torqueDemo) will execute a client script after a few ticks? Or within its program loop?
Any suggestions and/or opinions are appreciated. :)
Thanks.
Alex
This post is related to an earlier post of mine.
I have been trying to get the bots working on for my mod Tabukan and stumbled into a problem which I cant figure out how to fix.
What I basically want to do is to create NPC's or bots which would do it own thing without intervention from the player. I can actually make the bot move around but everytime it reaches its destination ... it stops and ... it just stands there. I know this is logical ... but I want to be able to make a list of thing that it can do and make it do so one after the other.
Currently, I was thinking of hooking into the main program loop but I'm considering that as the last option. Hmmm. Is there a way that the system (torqueDemo) will execute a client script after a few ticks? Or within its program loop?
Any suggestions and/or opinions are appreciated. :)
Thanks.
Alex
About the author
I am an independent game developer who's never going to make it in the industry because I'm color blind and has absolutely no imagination.
#2
Badguy. Thanks for the suggestion. When I woked-up this morning ... I actually did some coding and hooked some codes to the onReachDestination() callbacks and the bot is now doing its own think. ;P
Although, Im bothered by my implementation since Im reliant on the onReachDestination() callback for it to do something else. What if it never reached the next destination? What if the bot falls into a deep hole?
Oh well. Back to the drawing board then.
Alex
P.S.
What if the bot's action does not require it to move to another destination? What if Minie Mouse never married Mickey Mouse? What if ... ?
11/18/2002 (4:04 am)
Heh, I think I just needed a good night sleep (been busy mucking around in Anarchy Online) ... Badguy. Thanks for the suggestion. When I woked-up this morning ... I actually did some coding and hooked some codes to the onReachDestination() callbacks and the bot is now doing its own think. ;P
Although, Im bothered by my implementation since Im reliant on the onReachDestination() callback for it to do something else. What if it never reached the next destination? What if the bot falls into a deep hole?
Oh well. Back to the drawing board then.
Alex
P.S.
What if the bot's action does not require it to move to another destination? What if Minie Mouse never married Mickey Mouse? What if ... ?
#3
he could end up with the wrong info and cross the map...
or there would be no next generation of the mouse family
WOOT! >:)
so what I propose is for each objective you have a logic path in script
so when processing each objective possible..
there are some basic checks performed to maintain Logic.
11/19/2002 (12:19 pm)
Indeed ..he could end up with the wrong info and cross the map...
or there would be no next generation of the mouse family
WOOT! >:)
so what I propose is for each objective you have a logic path in script
so when processing each objective possible..
there are some basic checks performed to maintain Logic.
Torque Owner Badguy
used to store info about an Objective.
I support a few that are necessary and use the script to invoke the Objective remove it and process it, I simply have a AIObjective Vector list available in the AIPlayer to manipulate via the script functions provided.