Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: phreak on November 10, 2002, 02:24:31 pm
-
i recently made some properties of corkscrew missiles be defined in tables, before they were hardcoded in the game. The new "$Corkscrew:" flag is optional after any EMP and Leech info that is defined. If "$Corkscrew:" is not defined, it reverts to defaults assigned to the Tornado. It goes as follows. It ignores this if the weapon does not define "corkscrew" in the flags.
$Corkscrew:
+Num Fired: 4 ;; Number fired in single-fire mode
+Radius: 1.25 ;; radius of spiral
+Fire Delay: 30 ;; fire delay in milliseconds between each individual missile
+Counter rotate: YES ;; counter rotate alternate missiles
+Twist: 5 ;; rad/sec the missiles twist
The code is ready to be CVSed now
-
:yes:
-
:nod::yes: Excellent!
-
Will this break anything in the current game if we go ahead and committ it? Do we need to edit old files or something?
-
Originally posted by PhReAk
If "$Corkscrew:" is not defined, it reverts to defaults assigned to the Tornado.
-
Oops :)
Thank you :)
In that case phreak, committ away :)
-
done
-
Just a [random] suggestion: Perhaps you might want to change dAngle/dt from degrees to radians. Because of the circular nature of the corkscrew, a circular measurement might be better than a triangular measurement.
Why? It just sounds better. ;)
-
i was just about to change the comment to read radians.
-
Can anyone add acuracy code? SO the missiles fly about abit as if they wern't engineered very well? (unblanance in eninge thrust not gravity and wind:rolleyes: )
-
If I can get Bob's CVS issues sorted out, I'll go ahead and tag/release 3.3.1 which will include this.
-
Originally posted by PhReAk
i was just about to change the comment to read radians.
Um... That will also require some changes in the code itself. [Radians]=(Degrees)(PI)/(180)
-
the comment in the code read wrong, i set "+Twist:" to 25, it went around *much* faster than 25deg/sec
-
Wha... WHAT THE SAM HELL?? THAT'S MY PROJECT!!!... :( :( :(
Eh, nice job m8. I had a considerably larger re-vamp to the swarm system itself planned, not just the corkscrew. I aint surprised that someone else got to it first, considering I don't know C++ :D. Anyway, what I did was make it so the missiles could do both swarming and corkscrewing, sorta like $swarm and Corkscrew flag together. It was supposed to have stray distance for swarm, and a smoother version of swarm as well. Hopefully it would do a random curve instead of a random angle. It also would have had an inner radius and an outer radius for larger swarms of corkscrews. That, and all the other common things you did. I got a very small amount of progress done before it wouldn't compile, but oh well. Maybe some of this stuff can go into your next build of it!
I really wish I knew C++, then I could have the glory :(.
/me plays his violin...
-
Maybe we could have it so that a swarm could launch, but with no angles. Maybe four missile would launch at the same time, but out of different firing points.
-
Well, I found my plan file, here it is what I hoped it would be:
$salvo:
+SalvoType: 3 // 0=None (regular missiles); 1=Swarm; 2=Corkscrew; 3=Both
+Projectiles: 8 // How many are fired
+FireDelay: 150 // Delay in Milliseconds
+SWARM:
+MinDelay 100 // Minimum time before random course change
+MaxDelay: 200 // Maximum time before random course change
+MinAngle: 2 // Minimum angle for random direction
+MaxAngle: 15 // Maximum angle for random direction
+Independant: 0 // Allow missiles to stray (boolean)
+Curved: 0 // Use rads instead of deg (boolean)
+CORKSCREW:
+CounterRotate: 1 // Missiles will counter rotate
+Rotation: 10 // Degrees per second the missiles will twist
+Radius: 1.50 // Radius of the corkscrew
+OuterShell: 2.25 // 2/3 of missiles will be in this shell
// (projectiles must be a factor of 3), 0 for none
Mutate it, build upon it, do whatever to it. Hell, call me an idiot for not knowing C++, just give me a 5% gross profit share :D. I know it's possible some of these things can't be done, but can you try, phreak?
-
I think it can be done, but FS2 handles swarm and corkscrew missiles differently
-
Yes they are handled differently, but they can be combined if each aspect stays on it's own side of the line. The Tripod missile I once made had a corkscrew flag, and had $swarm: 3 on it, and it worked quite well:nod:. I think in this case they might be a bit too conflicting in the properties because of the amount of customization, so perhaps it might be best to leave out type 3. I'm no programmer, so I cant say.
-
Bump...
So, is anyone going to work on it, cause I cant. Phreak, do you volunteer?
-
i've been busy with the OpenGL port recently.
-
Can that work on promary weapons (balistic and non-balistic)?
-
never tried. good luck hitting anything with spiraling primaries