ADVANCED 3D - Chapter 7 More AI Issues
by Dustin Sims · in Torque Game Engine · 11/18/2005 (8:10 pm) · 0 replies
I have been hacking away trying to figure out the AIGuard.cs bugs and have just got online here and read about the ones posted.
Can someone explain the Fix that Paul Jan posted on the GetRelativeBearing(%that) function.
Why it did not work with both (%this and %that) as parameters..
Also, I can not figure out why the alertness property doesn't work.
I did Find that in the SpawnBot function there was a bug in the bookcode where %this.aggression would not get set because the code read " %thisbot.aggression = %spawn.aggressiveness -<---- this should be aggression. It is coded as aggressiveness 3 times where it should be aggression. Hope this helps someone else out.
Ok back to the .alertness, It gets set in spawnbot, and I echo to console to make sure, but once the DoScan function gets called my AiPlayer loses alertness or something. At the end of DoScan, where it schedules itself again, it uses %this.alertness in the time calculation, but I can echo(%this.alertness); right before it and it comes up blank like there is nothing in the property.
Also, should that schedule function not be right before the last } bracket so that it "ALWAYS" gets called, where it's located now, it is dependant on that last else statement..And that seems to lock up my Bot after a while because it quits scheduling the DoScan at some point in time.
Anyway, any help would be greatly appreciated, I have been at this all day and still don't have it completely working..
Can someone explain the Fix that Paul Jan posted on the GetRelativeBearing(%that) function.
Why it did not work with both (%this and %that) as parameters..
Also, I can not figure out why the alertness property doesn't work.
I did Find that in the SpawnBot function there was a bug in the bookcode where %this.aggression would not get set because the code read " %thisbot.aggression = %spawn.aggressiveness -<---- this should be aggression. It is coded as aggressiveness 3 times where it should be aggression. Hope this helps someone else out.
Ok back to the .alertness, It gets set in spawnbot, and I echo to console to make sure, but once the DoScan function gets called my AiPlayer loses alertness or something. At the end of DoScan, where it schedules itself again, it uses %this.alertness in the time calculation, but I can echo(%this.alertness); right before it and it comes up blank like there is nothing in the property.
Also, should that schedule function not be right before the last } bracket so that it "ALWAYS" gets called, where it's located now, it is dependant on that last else statement..And that seems to lock up my Bot after a while because it quits scheduling the DoScan at some point in time.
Anyway, any help would be greatly appreciated, I have been at this all day and still don't have it completely working..