Page 1 of 1

How to get Building Units to fire on attackers?

Posted: 27 Feb 2016, 15:16
by PicassoCT
A unit is building something- meanwhile it gets attacked. It has a a weapon, yet the weapon refuses to fire.

Hoko mentioned one of the call-ins - but i couldnt find a description for it on the wikki.
https://springrts.com/wiki/Lua:Callins

Help and advice would be welcome

Re: How to get Building Units to fire on attackers?

Posted: 27 Feb 2016, 15:21
by hokomoko
not me

Re: How to get Building Units to fire on attackers?

Posted: 27 Feb 2016, 15:32
by FLOZi
Think you might be referring to https://springrts.com/wiki/Lua:Callins# ... erHoldFire but not sure it does what you want

Re: How to get Building Units to fire on attackers?

Posted: 28 Feb 2016, 09:41
by Google_Frog

Re: How to get Building Units to fire on attackers?

Posted: 28 Feb 2016, 10:21
by PicassoCT
Thanks google frog :)

Also thank you FLOZi, you where right after all.
Just seems - strange decision to put this logic in a gadget call. Who wrote this and why this approach?

Re: How to get Building Units to fire on attackers?

Posted: 28 Feb 2016, 10:49
by Silentwings
I wondered this too, feels like it ought to be a unitDef property to me.

Re: How to get Building Units to fire on attackers?

Posted: 28 Feb 2016, 11:23
by PicassoCT
the problem is, it shouldnt exist at all.

You can allow or deny fire within the weapon calls. And you can acess a unitscript from gadgets. So there are ways allready existing to use both approaches

Re: How to get Building Units to fire on attackers?

Posted: 28 Feb 2016, 15:32
by hokomoko
PicassoCT wrote:the problem is, it shouldnt exist at all.

You can allow or deny fire within the weapon calls. And you can acess a unitscript from gadgets. So there are ways allready existing to use both approaches
yup, it's probably there to save people from editing lots of .bos files or something

Re: How to get Building Units to fire on attackers?

Posted: 28 Feb 2016, 16:31
by PicassoCT
The whole configuration thing is difficult and i can understand anyone who wants to reduce tags - in particular on behavior that consists of multiple tags interacting. Better gamedev to code rule state machines, then to have them internal .

Another nightmare is behaviourristics of fast units. As in planes movement behaviour when comandereed into dangerzones. But i digress..