I'm posting this question here in hopes of getting better response (original can be found @ http://forums.beyondunreal.com/showthread.php?t=127292).
[original post follows]
I'm working on creating a new controller class that will play bombing run (hopefully) better.
One technique I want the bots to use is to shoot the ball while in the air with a shockrifle class weapon. I do a check based upon bot location relative to the goal and ball, weapon type, etc. in my ShootAtBall() function. If everything looks good, it returns true.
If I use the previous code, the bot will shoot the ball fairly regularly, however, if I make the following modifications, the bot will hit the ball often enough to "juggle" it. (I think this is more desirable because I will be able to grant a greater range of skill to the bots).
I've also checked the bot state and it seems that it is almost always in the fallback or roaming state.
Given these observations, I have three concerns:
1). I am not sure that tick is the best place for this check but am unaware of a better solution. The Shock combo is done through a Monitor function in the ShockRifle's tick function, but I'm not sure I need to be that precise. Perhaps I could use a timer in a new state*?
2). If I do not control when or how often the bot shoots (as in example 2), I am unable to effectively scale the bot's abilities based upon skill levels.
3). In my trials, the bot never fails to hit the ball. How do I attach the aimError function to the shot attempt?
Any insight is greatly appreciated.
*[edit]A link or example (for constructing a timer or applying the aimerror) would be appreciated.[/edit]
[original post follows]
I'm working on creating a new controller class that will play bombing run (hopefully) better.
One technique I want the bots to use is to shoot the ball while in the air with a shockrifle class weapon. I do a check based upon bot location relative to the goal and ball, weapon type, etc. in my ShootAtBall() function. If everything looks good, it returns true.
Code:
function Tick(float deltaTime) { Super.Tick(deltaTime); if(ShootAtBall()) { Target = BombingRunSquadAI(Squad).Bomb; Enemy = Pawn(ShotTarget); Log("ShotFiredAtBall="$Pawn.Weapon.StartFire(0)); } }
Code:
function Tick(float deltaTime) { Super.Tick(deltaTime); if(ShootAtBall()) { Target = BombingRunSquadAI(Squad).Bomb; //Enemy = Pawn(ShotTarget); //Log("ShotFiredAtBall="$Pawn.Weapon.StartFire(0)); } }
Given these observations, I have three concerns:
1). I am not sure that tick is the best place for this check but am unaware of a better solution. The Shock combo is done through a Monitor function in the ShockRifle's tick function, but I'm not sure I need to be that precise. Perhaps I could use a timer in a new state*?
2). If I do not control when or how often the bot shoots (as in example 2), I am unable to effectively scale the bot's abilities based upon skill levels.
3). In my trials, the bot never fails to hit the ball. How do I attach the aimError function to the shot attempt?
Any insight is greatly appreciated.
*[edit]A link or example (for constructing a timer or applying the aimerror) would be appreciated.[/edit]
Comment