Counting and tick relationship and decisions

Posts: 13

Counting and tick relationship and decisions

Post#1 » 03 Mar 2019, 13:31

I've looked through the wiki and I've read through these forums and I've done my own experiments but I'm still a bit stumped so would appreciate some certain answers.

Firstly at what point(s) in a tick does a counter adjust? Is this dependent on variables or do all count effects happen at the same time (beginning or end) of a tick.

Secondly at what point in the tick does a bot change/ read its commands.
For example;
If a bot is advancing and then decides to retreat after having moved across a critical distance threshold which changed its commands...
At what point in a tick does it realise its position?
At what point does the decision change?
At what point does the decision take effect and become actionable?

I know it is perhaps a bit silly to break down a tick but I'm perplexed whether these things happen at the begining or end of etc.

Posts: 68

Re: Counting and tick relationship and decisions

Post#2 » 07 Mar 2019, 21:21

Tags and counters are adjusted instantly. If a node in your AI says "tag myself x" every condition "if myself tagged x" executed after this node will be returned as true. I highly recommend you not to use "tag x" in a tree below "if myself tagged x" to prevent bugs.

Team tags and team counters also rely on the instantiation order of your bots: Bot B can read team tags at the same tick bot A made it. However, bot A has to wait to the next tick to read team tags made by bot B.

All other decisions rely on the state of the last tick. If an enemy attacks your bot, it will realise that at the beginning of the next tick.

The actions should be executed during the whole tick, but I am not sure about that. :?

shadow trooper
Hello World
Hello World
Posts: 1

Re: Counting and tick relationship and decisions

Post#3 » 24 Apr 2019, 20:29

Great explanation, thank you.

As for the attacking bot realisation, I find it a bit confusing. I've played with a dummy scenario where a bot starts the counter once attacked by a MG and tries to dodge on every 8th tick and for some reason every other cycle MG will stop aiming and begin from start once the bot is back in the range (which is the desired effect), but then every other cycle it will start firing (and hitting some) at the same time when the bot tries to flee.

Then again I'm new to this, perhaps I'm doing something wrong...

Return to “Questions”

Who is online

Users browsing this forum: No registered users and 16 guests