How to get Building Units to fire on attackers?

How to get Building Units to fire on attackers?

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

How to get Building Units to fire on attackers?

Post 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
hokomoko
Spring Developer
Posts: 593
Joined: 02 Jun 2014, 00:46

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

Post by hokomoko »

not me
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

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

Post by FLOZi »

Think you might be referring to https://springrts.com/wiki/Lua:Callins# ... erHoldFire but not sure it does what you want
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

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

Post 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?
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

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

Post by Silentwings »

I wondered this too, feels like it ought to be a unitDef property to me.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

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

Post 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
hokomoko
Spring Developer
Posts: 593
Joined: 02 Jun 2014, 00:46

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

Post 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
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

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

Post 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..
Post Reply

Return to “Lua Scripts”