Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Black Wolf on March 05, 2015, 07:15:02 pm

Title: Any way to count a turrets number of shots?
Post by: Black Wolf on March 05, 2015, 07:15:02 pm
Fairly straightforward question, bit I'm fairly sure there's no straightforward answer: Is it possible to count the number of times a given turret has fired? Specifically, missile and blob turrets. I want to simulate limited capship magazines, but as far as I know, there's no way to count these things. But I thought Id make sure nobody had come up with a solution to this problem before?
Title: Re: Any way to count a turrets number of shots?
Post by: niffiwan on March 05, 2015, 07:59:27 pm
You could probably do this with LUA scripting, using the "On Weapon Fired" hooks to increment a counter and a check that when the counter for that turret/weapon reaches a threshold to prevent firing / lock the turret? (please note that I've actually done this myself, but I think it could work).
Title: Re: Any way to count a turrets number of shots?
Post by: Black Wolf on March 06, 2015, 01:51:44 am
Ah. Yeah, I guess I figured scripting wqould be able to handle it. Was hoping for a native way - lua is not one of my things.

Oh well, for now it's not super super urgent.
Title: Re: Any way to count a turrets number of shots?
Post by: procdrone on March 06, 2015, 05:02:57 am
Ask Spoon, as I recall, there was a mission in Wings of Dawn featuring something similar, capship was to shoot 3 missiles, and warp out, and it did. Im not sure if this is not just a sneaky depart delay, but Its worth a shot to check.
Title: Re: Any way to count a turrets number of shots?
Post by: TrashMan on March 15, 2015, 10:57:56 am
Really, has anyone thought of implementing turret ammo into FSO?