Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Nemesis6 on April 22, 2009, 10:44:39 am
-
This is kind of a follow-up thread to this one: http://www.hard-light.net/forums/index.php/topic,60834.20.html
Any progress? I know there were apparently some problems with getting it to work in multiplayer because of the SEXP stuff. Anyway, it was pretty damn awesome to fly a capital ship, and I hope it won't just stay as a kind of demo. Would be nice to see at least just one mission with it. Speaking of which, I should learn to FRED. Might as well make myself useful instead of just demanding things! :)
-
I'm currently working on advanced capship flying ,it has been also done for retail ,here:
http://www.freespacemods.net/download.php?view.524
In simulator you can fly GTC Fenris ,it's not the way I want to do this ,but it's working nice.
My solution require lot of modding and in Merkar demo it's only FREDing ,none of them require coding.
-
im working on a bridge simulator. hA!
-
My solution required a combination of FREDing and modding. However, I made sure not to specifically modify the executables for 2 reasons:
1. I don't really have that much programming knowledge with C
2. Flexibility and duplicability would be lost
There needs to be a few SEXPs added for this to work as intended, without bugs and such. It's a matter of time before this happens, though, as Kara has expressed interest in this once 3.6.10 is released.
-
Actually I should be free to code in any needed SEXPs tomorrow so now's the time to tell me exactly what you want. :)
-
Cool.
WhenFiredPrimaryBank / WhenFiredSecondaryBank (an event that requires input: a ship. returns an integer value of the bank fired)
The significance of this is that I can carry out the SEXP exactly when the weapon is actually fired, meaning the sexp won't work if the primary/secondary doesn't physically shoot out. This is the most important function; it is IMPERATIVE that this one is done, even if all the other ones I would like can't be created.
LoadedPrimaryIs / LoadedSecondaryIs (I'm not sure how to go about this one. I need something that detects, more or less, which type of primary or secondary the player's ship is using, so I can allow the player to have loadout selections in the campaign, which is going to be very useful)
TargetIs (returns the player's current target so I don't have to manually list out EVERY SINGLE FIGHTER, which will be a nightmare considering that with conventional methods it's extremely annoying, additional waves of fighters can't be sexp'ed iirc, etc)
Edit: and yes, a FireTurret SEXP would be helpful for obvious reasons.
-
First one is done (http://www.freespacefaq.com/Misc-Downloads/Builds/Weapon_Fired_Since.7z).
I'm unlikely to bother trying the other two as they require a string return type and there is no such thing (yet). Personally I'd love to add one but it's doubtful I'll have the time for quite a while.
-
Well, it ALMOST works fine. If the delay is high (100ms), the beams will fire up to 5 times regardless of your energy level. They seem not to do the multi-beam effect if they are fired while double-linked. If the delay is low (1ms or 0ms), it works better, as in only firing one at a time, but it only fires when you do NOT have any energy. If it goes "chunk" and the energy bar doesn't go down, the beam fires, otherwise it doesn't do anything.
You might want to look at the code again to see why it does this. If you can fix it for either the low-delay or high-delay situation, we're all set.
-
I'll need to see a mission that displays this behaviour.
-
Download it here. (http://comclan.co.cc/xsera/Capship Stuff.rar)
-
Well first the download gives me about 10 different debug errors.
Secondly you have set the delay to 0 which is silly (Has the weapon been fired in the last 0 milliseconds means nothing)
Thirdly you are using the SEXP inside an every-time argument which as far as I can tell means you're going to get 70 beams fired a second.
-
10 debug errors? Weird.
Anyway, that won't do. The SEXP is fairly useless if it can only be used to fire the beam once ever...
-
The problem is the way you're using it.
-
How the hell should I use it then? Have a variable turn off as soon as the first beam fires and delaylink it to turn the variable back on? I'm not home at the moment, so I can't test this right now.
-
That's a possibility.
To be honest I'm a little confused about why you have things set up that way in the first place. For a start, I can't see why you're using every-time. If you used a repeating when and set the delay to the lowest fire wait of any of the weapons that turret can hold the problem would sort itself out.
Then all you'd have to do is set the time for the SEXP to something less than the delay.
So if I was dealing with a ship which had two possible beams with a wait time of 5 and 8 seconds I'd do this
when (Very high number of repeats, delay of 5).
-and
--primary-fired-since
---Revenant 1
---0
---4000
-rest of Event here
As a result this beam now can't fire again for the duration of the fire wait.
-
I usually don't code the way SEXPs are set up and such, so even though I've used them for a long time, it still manages to be foreign to me.
Anyway, I tested a bunch of different methods, and apparently the one I suggested is working out the best. The AAA beams work perfectly right now, but the energy-using main beams still have a few energy-related problems. I'll fix these eventually through trial and error with different delay lengths.
-
How did you get the AAA beams to work? By manual fire or just automatically?