Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: AndrewofDoom on January 31, 2010, 10:03:20 am
-
Would it be possible to add such a flag to the weapons table? You know, so the user has to keep pressing to fire more. The fire wait would be the reload time of the gun then (which would hopefully be low and all, but...). I'd like this, as the Feather 2's gun for the mod I'm helping to make was always semi-auto in the old games, and we wish to keep it that way.
-
Sounds like it's more of a ship thing than a weapon trait then. It should be possible, just gotta find a coder who can implement it.
-
semi-auto seems more like a weapons thing to me.
-
Agreed. This is an attribute of the weapon, not the ship it's mounted on.
-
if you need a weapon to have a different effect on a particular ship, you could just make an alternate version with a #something (cyclops#short and hornet#weak comes to mind) appended to the name.
speeking of those is there any way to make the loadout screen represent # defined alternate versions with the same icon as their standard version? say you have a cyclops and a cyclops#short, and i make a new bomber that i only want to carry the #short version. is there any way to only display one cyclops icon in the loadout, and have the engine pick the most compatable version while perfering the one without a # character in the name, but will take whatever works.
-
Burst fire type weapons can already be implemented. Semi automatic appears to have been idea of 'non-stream' weapons but i don't remember those ever having worked like that.
-
I recall that "stream" flag does something with sounds, not the weapons firing.
-
^ thats what ive always thought. its so that sounds for rapid fire weapons loop rather than use a different sound channel.
-
There seems to be many legends about the "stream" flag floating around... perhaps those ought to be cleared...
#define WIF_STREAM (1 << 31) // handled by "trigger down/trigger up" instead of "fire - wait - fire - wait"
// if we're firing stream weapons, but the trigger is not down, do nothing
if(stream_weapons && !(shipp->flags & SF_TRIGGER_DOWN)){
return 0;
}
..
// if we're firing stream weapons and this is a non stream weapon, skip it
if(stream_weapons && !(winfo_p->wi_flags & WIF_STREAM)){
continue;
}
// if we're firing non stream weapons and this is a stream weapon, skip it
if(!stream_weapons && (winfo_p->wi_flags & WIF_STREAM)){
continue;
}
In short, "stream" flag:
- does not influence weapon rate of fire
- does not have much to with sound effects either
-
Is this something for joysticks then?
-
No... The "stream" flag does pretty much nothing, apart from making the code run the fire primary function twice instead of just once.
-
Burst fire seems a more appropriate term. . .
-
So either way, there is no way to implement what was requested. So it's still valid. Plus, that comment in the code about 'stream' seems awfully misleading too, almost like it says that it is a semi-auto function, which would be even more inappropriately named.
-
No... The "stream" flag does pretty much nothing, apart from making the code run the fire primary function twice instead of just once.
If this is the case, why not just remove it?
So either way, there is no way to implement what was requested. So it's still valid.
Maybe a "semiauto" weapon flag?
-
after looking at the burst options in the wiki, i noticed that it had its own flags section. i would put the semi-auto flag there. if not set burst would function normally, if set then you would have to release the trigger before you could fire another burst. of course for a single shot semi-auto, your burst shots would be one. you could also do the m16 3 shots stop and youd have to pull again to fire another burst. if used in the weapon flags instead it should work with burst.
-
As long as the cooldown works as expected with burst, having a burst of one sounds like it should work fine.