Hard Light Productions Forums
FreeSpace Releases => Scripting Releases => Topic started by: m!m on March 10, 2011, 12:21:23 pm
-
Here is another script I've been working on that gives you control about a turret :D
I attached a zip file containing the mod. I comes with a test mission and it depends on Blue Planet 2 (because their turrets are perfect for this :nod:).
If you tried it, please tell me what you think and what could be better :)
A random screenshot:
(http://img23.imageshack.us/img23/387/turretcontrol.jpg)
Download the new version here: http://www.mediafire.com/?jzqmoe2882kvv52 (http://www.mediafire.com/?jzqmoe2882kvv52)
Regards,
m!m
-
Holy ****. :eek2:
-
This things throws lua errors about screen width, and none of the HUD elements you have on that screenshot are to be found.
LUA ERROR: [string "bankInfo.lua"]:5: attempt to perform arithmetic on global 'screenWidth' (a nil value)
------------------------------------------------------------------
ADE Debug:
------------------------------------------------------------------
Name: ?
Name of: field
Function type: Lua
Defined on: 70
Upvalues: 0
Source: misc-sct.tbm - On Game Init
Short source: [string "misc-sct.tbm - On Game Init"]
Current line: 75
- Function line: 6
------------------------------------------------------------------
------------------------------------------------------------------
LUA Stack:
?
loadGauges
?
execute_lua_file
------------------------------------------------------------------
------------------------------------------------------------------
Also, the vertical camera control is inverted, which is quite problematic.
-
Ok that could be an issue with the loading order although I can't reproduce it on my side but I uploaded a new version that shouldn't rely on a specific load order.
Also the vertical control isn't an issue on my side. What input system do you use, maybe that is the cause.
-
does this just slave the joystick to the turret control, or ar you using some other method?
-
Yes it uses the joystick (or whatever you use) to move the turret.
-
I have an update that adds some minor functionality.
List of changes:
- Script now checks for collisions when a weapon is fired
- Indicator that points to bombs in the current mission
- Visual indicator for subsystem position and facing on the minimap
Be sure to test it using a recent build for correct firing points :p
Regards,
m!m
[attachment deleted by ninja]
-
I haven't got access to FS2 to test this at the moment, but I do have one question - can it be turned on/off by sexp? I could really, really use this if that ws the case.
-
Any script can be written in such a way as to make that possible.
-
The script is written with something like that in mind. It can even be modified to only draw the HUD or only control the turret.
-
Would this lead to missions where you're forced to operate a turret because an ambush splashes your carrier ship's fighterbay? :D
-
Looks cool, but...
What are the controls?
I can move around, and (sometimes) shoot, but the shots always just go straight up. Enemies are on the radar, but they all seem to be well behind my ship and out of my turret's field of fire...
-
You can control the turret using the "standard" input method FS uses (mouse, keyboard, joystick, ...) and press F5 to get a list of possible hotkeys.
Concerning your second problem, are you using a recent build of FSO?
-
You can control the turret using the "standard" input method FS uses (mouse, keyboard, joystick, ...) and press F5 to get a list of possible hotkeys.
Concerning your second problem, are you using a recent build of FSO?
Did an SVN update and a fresh build just to test this out. :)
I'll try it again when I get the chance.
-
Same problem: turret definitely isn't shooting where I (or the barrel) is pointing.
-
Has the problem mentioned by Sushi been solved? Also, I've just noticed that m!m's screenshot (see link at the beginning of this thread) may have been removed.
-
has this script been mirrored anywhere? i need to update my cockpit script to use the new meathod of turret control and needed a reference implementation to dissect. seems my turret system was broken with newer builds, and instead of trying to fix it i figured id just do things the right way and re-write it to use the new features.
-
Here it is http://www.mediafire.com/?7ez65jn0warzf0f (http://www.mediafire.com/?7ez65jn0warzf0f) but I'm not sure if it even works :nervous:
-
this should help, thanks.
thats the funny thing about scripting, stuff that works on one build seldom works on another build. its not as bad as when wmc was trying to hammer out a paradigm for the scripting system, where he renamed functions and variables at random. but its enough to break things that i spent weeks developing. since they fixed my rtt issue been trying to bring old epic scripts up to date with the engine. your features will replace many a dirty hack in my scripts.
-
Well, I wasn't active in those days but I rather meant that I'm not sure if I changed something inside the script which broke it.
Also you're welcome for the RTT fix :p
-
you certainly got my project out of the gutter with that one :D
-
And I now have a working guncam script which integrates nicely with Swiftys cockpit display system.
-
I'm not sure if I changed something inside the script which broke it.
Well, I didn't get any error messages running it on 3.6.14d RC1, but the test mission just gave me the crosshair thing, it didn't have any other visible interface elements or the ability to fire the turret.
-
Yeah, that's what I meant but I'll just rewrite it so it can be used as a standalone script and I'll also try to include a FRED interface.
-
Here is a new version with a completely rewritten (and this time actually working) version of this script. It includes a FRED interface and the ability to configure a few things using configuration files. The link in the first post has been updated to point to the latest version.
The package contains the script files, a demo mission (requires Blue Planet 2) and an example configuration file, for more information about how to use them please take a look at the PDF file in the data/docs/TCS directory.
If you have been using this script before then you may have to update your missions as some functions have been removed and replaced by corresponding configuration options.
-
You forgot to include the test mission.
-
Link updated, now the package should contain the test mission.
-
Just got home, looking forward to testing these upgrades. :D