Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: PotzUK on August 01, 2006, 08:48:34 am
-
Quick and easy question... is there a way to keep the chosen ship from Mission A to Mission B, with the ammo and damage amounts without having to use Red Alert?
I'm doing a mission where you follow you cap ship into subspace, so you shouldn't be able to change your ship or load-out, and as it's a low-key mission I dont need Red alert...
Cheers :)
-
Red alert carry status?
Maybeeeeeeeeeeeeeeee.............. :nervous:
-
You can fudge it with persistent variables. Store the needed values just before the first mission ends, then set them from the variables when the next mission starts. Then combine it with scramble so the player can't go check the loadout screen and discover your hoax before things get set properly.
-
Decker : My post said I wont want to use the Red Alert function :P
Shade : Is there a how-to somewhere to show me how do set those variables?
-
The best how-to in the world: Karajorma's FAQ. (http://homepage.ntlworld.com/karajorma/FAQ/intro.html) Check under FredOpen help.
-
Ahh - cheers :)
I've seen that before, but it didn't click. I was expecting the sexp to be called 'set-variable' ::)
Cheers guys
-
To be honest I've got no idea what happens if you do a red-alert with no briefing set from the Mission Specs editor but that would be the first thing I'd try.
-
That would only work if no one actually enters subspace ('cept the player). Red alert keeps track if a ship left, so if it leaves and you red alert, it won't be there next time.
-
Good point. Shows how often I use Red-Alert these days :)
-
To be honest I've got no idea what happens if you do a red-alert with no briefing set from the Mission Specs editor but that would be the first thing I'd try.
I'm using this in one mission and it works as you would expect. If there aren't any other missions in between, this is a much better way to do it than messing with the persistent variables.
-
Yep. That's why I suggested it. It will do all the work of storing all the subsystem data for you without having to roll your own SEXPs for every ship you want to store.
As long as you only have a couple of other ships making subspace jumps I'd probably still recommend doing things that way and using PVs to fill in the gaps.
-
Thanks guys, i'll give it a shot.
I only have the cap ship and 3 wingmates to worry about, so if I have to use PVs, then it shouldn't be too much of a headache :)
-
:necro:
I'd like to confirm this is still the case: if I have a ship in a prior mission that I want to have identical status in a later mission, I need to record everything about it in variables? So I'd need one persistent variable for every subsystem?
If so I think I'd rather cut it down by just recording the hull strength and critical subsystems, like beam turrets, then using subsys-set-random for the rest. Consider this a feature request for a carry-status SEXP that works identical to Red Alert.
-
Wait, don't we have the ship save/load script that can easily carry over ships between missions even if they're not red-alert?
-
yep: http://www.hard-light.net/forums/index.php?topic=74716.0
-
I've inspected the script and it seems to have a serious drawback:
saveship('shipname'):
In case the ship is destroyed, departed or not existing (including not arrived) it does save this status.
loadship('shipname'):
If the ship has departed, was destroyed before saving or not existent while saving, it uses ship-vanish on it.
Here's the issue: I want to save the status of the ship when it departs, so the player can chase it into a future mission and its status will be the same. This script seems to treat departed ships as nonexistent.
Is there a script that can save the status of specified ships either when they are departed or destroyed, or when the mission ends? Otherwise I'll probably use persistent variables when the ship has triggered its departure condition and reaches 40 m/s, has been destroyed, or when the RTB directive has been given and the player presses ALT-J.
-
Couldn't you just save the ship immediately before it departs?
-
Unless I'm wrong, as far as the engine is concerned, a departed ship doesn't exist anymore - it's got nothing to do with the script or any other way around, the engine simply can't make up info about ships that don't exist.
Like PH said, you'd have to save right before the ship departs.
-
Wheres the welcome beam speech
-
Wheres the welcome beam speech
Not here... :wtf:
Couldn't you just save the ship immediately before it departs?
:doh: Of course... I'll set the script to evaluate BEFORE it leaves, same as I was doing with variables. Thanks.