Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Trivial Psychic on December 11, 2016, 10:20:31 pm
-
So I'm working on the second mission in the FS1:U chapter 1 loop, and I'd like one ship to be miss identified as another, until it is scanned. I'm not talking about a different class, but as a different ship name. I thought that the ship-change-callsign might do it, but it just adds a second name next to the main. Is there any way to do this?
Also, I have a wing of ships that I want to depart via destroyer fighterbays, except I want two to enter the fighterbay of one ship, and the 3rd into the bay of another ship. I've tried using set-departure-into, but it seems that the wing's departure info overrides this. I thought that perhaps there might be a disband-wing sexp, which I could use to kill this, but I couldn't find one. I guess it doesn't exist. Any ideas?
-
I don't believe either of these are possible.
For the name issue, you could try spawning a replacement ship, noting the position and rotation of the other (and speed and damage, if appropriate - there's a copy-damages SEXP that'll help with the last), then ship-vanishing it and copying the noted values to the replacement. Of course, that'll forcibly un-target the ship...
For the wing issue: does it actually have to be a wing? I mean, if the player never gets to give them orders, you could just manually name them as if they were in a wing and hope no one looks too closely at the F3 menu. Failing that, you could use warp-effect, ship-vanish, and a waypoint to pantomime the first two ships jumping out.
Otoh, hm, I've been looking for something useful to contribute to the SCP codebase...
-
You can change a ship's name via Lua; there's no SEXP to do it (aside from script-eval and friends, of course).
As far as I'm aware, a wing's departure cue/type/anchor will always override those of the individual ships in that wing.
-
Thanks guys. Scripting is a bit above my skill level, so I'll just have to change the plot a bit. As for the wing departures, I can live with that I guess.
-
Thanks guys. Scripting is a bit above my skill level, so I'll just have to change the plot a bit.
This isn't very complicated scripting; just need something like:
( script-eval-block
"Ships['"
"old name goes here"
"'].name = '"
"new name goes here"
"'"
)
(Somebody who actually knows Lua may want to double-check my work.)
-
.Name should be capitalized. On simple testing it does work, but you'll need to have your name changey ship referred to in sexps with variables and not just your ship's name by itself, because the game isn't going to keep up to date with your changes on its own.
-
If you set the "hide ship name" flag on a ship, then all it will display is the callsign. You can then make the callsign correspond to whatever identification you want, and change it as you see fit.
-
If you set the "hide ship name" flag on a ship, then all it will display is the callsign. You can then make the callsign correspond to whatever identification you want, and change it as you see fit.
Oh, yeah, that's a much better solution than using Lua to change the ship's name.
-
How about clearing the wing orders for them and giving each fighter an individual order? I think I saw something like that (a vessel from the player's wing following waypoints regardless of other orders) actually working somewhere.
-
How about clearing the wing orders for them and giving each fighter an individual order? I think I saw something like that (a vessel from the player's wing following waypoints regardless of other orders) actually working somewhere.
Works for orders because you can clear them; you can't not have departure information specified.
-
Do all the ships in the wing have to depart simultaneously? Because you could set the departure for one ship and then change it for the other two.
-
I've just decided to disband the wing and give them all separate waypoints and departure cues.