Hi, all.
I wanted to discuss what you think about adding a Delay node right after the Event OnPossess. My teacher told us it was advisable (I don’t really remember why), but in my case it just lead me to bugs because at some point I spawn enemies around the player (with RandomPointInNavigableRadius), so these enemies detect the player immediately with the Sight sense, so I set a Blackboard variable so the behaviour tree can move these enemies to the player. But in OnPossess I do some previous settings.
Now, if I add that delay, the OnTargetPerceptionUpdate triggers before the nodes at OnPossess (because they are delayed 0.2s) and, due to these previous settings not setting before, the nodes at OnTargetPerceptionUpdate fail and, until the enemies don’t detect the player again (the player must get far and approach again to them to be detected again) the AI behaviour doesn’t work.
Now, I deleted the delay and the AI works fine, so, in which cases it is more advisable to use this delay?