Page 1 of 1

How to make small steps forward?

Posted: 07 Feb 2017, 17:22
by Botique
Hi.

Working on bot AI and cant come up with good AI doing small steps toward tagged enemy.
The problem is that at some point all the shooting boils down to fight on the edge of "out of range" border. What I want my bot to do is to move closer to tagged enemy but not in one big swoop closing to midrange but like couple of steps and shoot... and again... couple steps and shoot.
In this way I expect to make pressure and force opponent off the field or take constant flow of cucumbers in the face.
I can do it for simmetric wall to wall maps like set your priorities. But also want the same AI work in circle of death. So anchoring to some opponent not good. Anhoring to base... not all maps has bases. So I am out of ifdeas. I am too lazy to program counters with tags...

Re: How to make small steps forward?

Posted: 07 Feb 2017, 17:23
by sethcohn
move toward not moving toward will take a step and stop.

Re: How to make small steps forward?

Posted: 07 Feb 2017, 17:45
by Botique
Oops it so simple. Thanks.

Re: How to make small steps forward?

Posted: 07 Feb 2017, 19:11
by pier4r
This will disrupt your fire a lot though.

Re: How to make small steps forward?

Posted: 13 Feb 2017, 13:48
by Botique
Yes...

What I would like to achieve is to use full cycle of shooting to shoot, but then do several steps forwad... and shoot... it's like while 2-3 bots shooting a target, 4th bot is moving... and make it like all the time forward moving wall... and not let opponent to use range advantage.

Re: How to make small steps forward?

Posted: 14 Feb 2017, 21:06
by sethcohn
"use full cycle of shooting to shoot," this is the hard part. There is no good way to decide that right now. There are lots of ok ways, but nothing solid. (ie shoot until shield/hit drops to fixed amount). There is NO 'shoot one round' option (yet)

Re: How to make small steps forward?

Posted: 11 Mar 2017, 06:44
by neoliminal
sethcohn wrote:move toward not moving toward will take a step and stop.


Could you explain this more simply? Exactly what code is being executed. Do you mean Action move toward with a filter? Two Actions, the first move toward and the second not? I'm not understanding the literal commands used here. :geek:

Re: How to make small steps forward?

Posted: 11 Mar 2017, 06:57
by harthag
neoliminal wrote:
sethcohn wrote:move toward not moving toward will take a step and stop.


Could you explain this more simply? Exactly what code is being executed.
Condition node="If self is not moving toward ___" Action node="[then] move toward ___"

When not moving toward "it", the condition is true, so the bot starts moving toward "it". As soon as it starts moving toward "it" the condition is no longer true, so the bot stops ... rinse and repeat ...

The trick is adding other conditions to keep it from becoming a useless endless loop ...

I guess another variation would be just an action node with a filter, yes, "self move toward ___" with filter "that self is moving toward (inverted)"

Re: How to make small steps forward?

Posted: 11 Mar 2017, 16:31
by neoliminal
harthag wrote:
neoliminal wrote:
sethcohn wrote:move toward not moving toward will take a step and stop.


Could you explain this more simply? Exactly what code is being executed.
Condition node="If self is not moving toward ___" Action node="[then] move toward ___"

When not moving toward "it", the condition is true, so the bot starts moving toward "it". As soon as it starts moving toward "it" the condition is no longer true, so the bot stops ... rinse and repeat ...

The trick is adding other conditions to keep it from becoming a useless endless loop ...

I guess another variation would be just an action node with a filter, yes, "self move toward ___" with filter "that self is moving toward (inverted)"


Ok, this makes sense, I'll play with it a bit. This might be why I've never had dancing bots.

Re: How to make small steps forward?

Posted: 11 Mar 2017, 16:53
by harthag
neoliminal wrote:This might be why I've never had dancing bots.
No, "dancing" usually refers to a back and forth motion. This is one direction only, but starts and stops.

Re: How to make small steps forward?

Posted: 12 Mar 2017, 01:29
by Ritter Runkel
I prefer walking forward in small steps too. You can check if you are not shooting (maybe old enemy is dead or fleeing or whatever). After that you could work with action filters. If you rush, someone will aim you ... You can stop. Nobody aimed at you ... Maybe the big step could be more effective.

I also tried to work with close to Allie filters, bit that really sucked :roll: