eronoobos / BABAR-The-Shardifant

Balanced Annihilation & Balanced Annilhation Reloaded configuration for Shard
2 stars 1 forks source link

one unit in 2 different attack behaviour #35

Open pandaro opened 8 years ago

pandaro commented 8 years ago

just a question: is possible to place a unit in 2 behaviours: example: t1 sub are usefull for -scout -raid -attack if i place it in both behaviour and find a way to discerning between behaviour is correct at moment?

eronoobos commented 8 years ago

Yes, that's how behaviours work. The behaviours give priorities through :Priority() and the unit elects and activates whichever behaviour has the highest priority at that moment, and deactivates the previous behaviour.

I'm not sure if raid and attack behaviours are designed to play well together, but take a look at their priorities, it might work.

eronoobos commented 8 years ago

to get them to work together, you could probably change https://github.com/eronoobos/BABAR-The-Shardifant/blob/501092d4af92363eb7720bf531795e3793bf9706/raiderbehaviour.lua#L110 to return 99. Then it would raid until told to join an attack group and attack.