FreeSpace Releases > Scripting Releases

remote controlled turrets revisited

<< < (5/6) > >>

i would love a function that makes your ship AI controlled when you controll the turret, and vice versa. with a turret view.

maybe in 3.7.90.....

why when you can do both at once :D

Nuke, what would be the idea function(s) for optimizing a script like this? I was thinking that a pointTurretAt3DPoint() function would be useful for something like this, and for other things. (Like a cutscene where you want a small ship to fly by a larger ship, while all of the larger ship's turrets track the smaller ship). But the more math I can move into the C environment, the faster the script will go.

that woyuld be awesome. currently, im using loop to go through the subsystems and check $name string in the subsystems properties for a #pt. if it finds it it will then look for other options in the name string like the rotation speed and the manual control flag. all this data is passed to the turret function which loops through the arrays and does all the math involved in manipulating the turret. big thing is im not actually firing the turret, im creating a weapon projectile with createWeapon(). im using about 6-8 calls of un/rotatesVector() per turret. using the script on a ship like the aeolas will essentially half your framerate. so doing 120 lines worth of scripot in a single function would be a hell of alot faster. volition's hackish turret code might be a mess but its a hell of alot faster than what i can do with script.

Do you have a script example posted?

I'd like to make it a little more usable than just a "run_Nukes_script_43" function in scripting. Something like "force turret target point" and then have a little point object you can create and move around (which I believe is already in the code) and move all the attached turrets. That way you'd just have to calculate the one 3D point based on the current mouse position. I don't know how you're doing it now.


[0] Message Index

[#] Next page

[*] Previous page

Go to full version