B_Attack in trigger (Gothic II: NoTr)
Hello!
I have a small / big problem.
I have three NPC's:
1. Bandit (instance: BDT_454_Bandit1)
2. Bandit 2 (instance: BDT_455_Bandit2)
3. Berko (instance: BAU_456_Berko, GIL_BAU)
I would like Bandit 1 and Bandit 2 to attack ONLY Berko. However, they must attack simultaneously and MUST be in trigger (After the player enters the trigger, the bandits should attack the NPC - berko).
Anyone got any idea?
EDIT:
Thanks to the help of a Russian moder, I found a solution.
"I've covered B_Attack and ZS_Attack with debug messages and found out that while in B_Attack slf and oth are correct, in ZS_Attack the other is not set properly. Usually it fails for the second bandit, but sometimes for the first or for both of them.
In B_Attack the line Npc_SetTarget(slf,oth); should theoretically initialize other, but it doesn't (I don't know why, it seems to never work as I wanted in my scripts).
We also have B_ValidateOther() function to fill missing other, and it takes his instance from AIV_LASTTARGET - so here is solution."~ НастасьСанна
Geändert von Fabiosek (02.03.2020 um 12:22 Uhr)
Grund: Solution