Author Topic: New s-exp request: mission-set-subspace  (Read 7907 times)

0 Members and 1 Guest are viewing this topic.

Offline Fury

  • The Curmudgeon
  • 213
New s-exp request: mission-set-subspace
We already have mission-set-nebula, could we please also get mission-set-subspace? Subspace is retail hackery consisting of two skyboxes, associated sound effects and what have you. If someone could code this for 3.6.12, BP staff would be really grateful. The feature would be tested by BP staff.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: New s-exp request: mission-set-subspace
This would be awesome. And would allow a neat little trick used in WiH (first-person subspace jumps without load time) to be even cooler.

 

Offline Iss Mneur

  • 210
  • TODO:
Re: New s-exp request: mission-set-subspace
Well, here is a quick stab at the problem.  It seems to do the subspace stuff that it needs to, though it does not remove shields from the ships when the transition happens. Patch is also included in the attached archive with an fs2_open_3_6_13d_INF_SSE build and pdb.  Unfortunately I am unable to build FRED right now, so FRED will complain about the sexp not existing.

I haven't done a subspace mission for so long I don't remember if any of the effects are missing.  Please try it and I will clean it up to apply to the 3_6_12 branch.  

Removed code and link to build.  See my next post in this thread.
« Last Edit: March 31, 2010, 02:30:42 am by Iss Mneur »
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: New s-exp request: mission-set-subspace
Whoa, that was snappy. Thanks so much!

Will try to get you some feedback.

 

Offline Fury

  • The Curmudgeon
  • 213
Re: New s-exp request: mission-set-subspace
Thank you very much Iss Mneur, we'll be sure to test this out. :)

 

Offline Iss Mneur

  • 210
  • TODO:
Re: New s-exp request: mission-set-subspace
As a result of my discussion of the feature with General Battuta today on IRC, I have also implemented a SEXP that will show the warpout gauge on the HUD.

So the patch adds:
  • mission-set-subspace <arg>
    • Turns subspace on/off
    • 0 for subspace off, 1 for subspace on
  • show-warpout-gauge <arg> (Edit 04-04-10: see below for updated sexp.)
    • Causes the warpout gauge to appear on the HUD.
    • Number of milliseconds that the warpout gauge should appear on the HUD. 0 will immediately cause the gauge to disappear.

As before, test it.  It doesn't seem to cause any problems but, I was only using a simple empty mission.  I have been unable to get FRED to build while working with Zacam, so for the time being you only have FSO builds.  I will have a look at this tommorow.  In the meantime Zacam should be along to post the FSO build.

EDIT: Newer patch below.
« Last Edit: April 05, 2010, 12:38:04 am by Iss Mneur »
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: New s-exp request: mission-set-subspace
Currently, this is JUST the Debug FSO Exec until I can resolve the FRED compile errors that occur with this .patch.

Based on Trunk 6045.

Debug-Inferno-SSE.7z
MD5: 6d5e9553dd893e035695344a13b563d5
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Spicious

  • Master Chief John-158
  • 210
Re: New s-exp request: mission-set-subspace
As a result of my discussion of the feature with General Battuta today on IRC, I have also implemented a SEXP that will show the warpout gauge on the HUD.
Have you considered generalising this to display arbitrary HUD messages?

 

Offline Iss Mneur

  • 210
  • TODO:
Re: New s-exp request: mission-set-subspace
As a result of my discussion of the feature with General Battuta today on IRC, I have also implemented a SEXP that will show the warpout gauge on the HUD.
Have you considered generalising this to display arbitrary HUD messages?
Showing arbitrary messages in the warpout gauge? The training message system apparently allows any message to appear just above the warpout gauge.

Also, I am trying to keep this simple so that these sexps can be added to 3.6.12.
« Last Edit: March 31, 2010, 10:16:27 am by Iss Mneur »
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: New s-exp request: mission-set-subspace
The build crashes as soon as it's selected, before I even hit 'run'.

Code: [Select]
Assert: args
File: cmdline.cpp
Line: 859

ntdll.dll! KiFastSystemCallRet
kernel32.dll! WaitForSingleObject + 18 bytes
fs2_open_3_6_13d_INF_SSE.exe! SCP_DumpStack + 354 bytes
fs2_open_3_6_13d_INF_SSE.exe! WinAssert + 208 bytes
fs2_open_3_6_13d_INF_SSE.exe! cmdline_parm::str + 68 bytes
fs2_open_3_6_13d_INF_SSE.exe! SetCmdlineParams + 1044 bytes
fs2_open_3_6_13d_INF_SSE.exe! parse_cmdline + 47 bytes
fs2_open_3_6_13d_INF_SSE.exe! game_main + 451 bytes
fs2_open_3_6_13d_INF_SSE.exe! WinMain + 330 bytes
fs2_open_3_6_13d_INF_SSE.exe! __tmainCRTStartup + 358 bytes
fs2_open_3_6_13d_INF_SSE.exe! WinMainCRTStartup + 15 bytes
kernel32.dll! BaseThreadInitThunk + 18 bytes
ntdll.dll! RtlInitializeExceptionChain + 99 bytes
ntdll.dll! RtlInitializeExceptionChain + 54 bytes

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: New s-exp request: mission-set-subspace
Error fixed, thanks IssMneur.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: New s-exp request: mission-set-subspace
SEXPs work as advertised except I don't think the set-subspace one is also initiating the distinctive ambient noise that usually plays in subspace missions.

 

Offline Iss Mneur

  • 210
  • TODO:
Re: New s-exp request: mission-set-subspace
SEXPs work as advertised except I don't think the set-subspace one is also initiating the distinctive ambient noise that usually plays in subspace missions.

We have worked it out on IRC, it seems the ambient subspace noise is working, it was just quieter than what General Battuta remembers.  With this patch we should have the FRED issue licked, but I need someone who can build FRED to confirm.  Would also like a coder more familiar with sexp to check and make sure that I have not committed any badness on the code.  In particlare how I am using certain "hidden" functions of the game loop and the hud code.

Edit: code removed as it has a bug, see below.
« Last Edit: March 31, 2010, 02:38:54 pm by Iss Mneur »
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: New s-exp request: mission-set-subspace
New version on the supplied above code/.patch:

Debug_Inferno_SSE_ver2.7z
MD5: 3b5e27dfde502e9c77e004b25c17855e

Now includes FRED with PDB file.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Iss Mneur

  • 210
  • TODO:
Re: New s-exp request: mission-set-subspace
Have found and fixed a bug with the mission-set-subspace sexp, where if the player causes a state change, like opening the options menu the subspace effect leaves when the player returns to the game.

Also available a fixed FSO binary for 3.6.12 and a fixed FSO binary based on trunk.  FRED is not affected by the fix.

Edit: updated patch is below.
« Last Edit: April 05, 2010, 12:35:44 am by Iss Mneur »
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline Spicious

  • Master Chief John-158
  • 210
Re: New s-exp request: mission-set-subspace
Showing arbitrary messages in the warpout gauge? The training message system apparently allows any message to appear just above the warpout gauge.

Also, I am trying to keep this simple so that these sexps can be added to 3.6.12.
Something more general than show this specific HUD element in this specific place. It just seems over-specialised in its present state.

  

Offline Iss Mneur

  • 210
  • TODO:
Re: New s-exp request: mission-set-subspace
Showing arbitrary messages in the warpout gauge? The training message system apparently allows any message to appear just above the warpout gauge.

Also, I am trying to keep this simple so that these sexps can be added to 3.6.12.
Something more general than show this specific HUD element in this specific place. It just seems over-specialised in its present state.

Okay a more generically named version show-warpout-gauge is now available. It is now hud-display-gauge.

mission-set-subspace is now implemented in a "more" reliable manner as a result of my talk with Karajorma.

For completeness both sexps added by this patch are described here.

  • hud-display-gauge <mseconds> <magic gauge name>
    • Causes the named gauge to appear on the HUD for the passed number of milliseconds.
    • mseconds - number of milliseconds for the gauge to appear for. 0 causes gauge to disappear immediately.  1 causes gauge to appear until turned off (with 0).
    • magic gauge name - one of:
      • warpout - shows the "Subspace drive active" message on the HUD.
  • mission-set-subspace <arg>
    • Turns subspace on/off
    • 0 for subspace off, 1 for subspace on

Code: (Patch for trunk) [Select]
Index: code/fred2/fred.cpp
===================================================================
--- code/fred2/fred.cpp (revision 6048)
+++ code/fred2/fred.cpp (working copy)
@@ -668,3 +668,7 @@
 
  return CWinApp::ExitInstance();
 }
+
+// Empty functions to make fred link with the sexp_mission_set_subspace
+void game_start_subspace_ambient_sound() {}
+void game_stop_subspace_ambient_sound() {}
\ No newline at end of file
Index: code/freespace2/freespace.cpp
===================================================================
--- code/freespace2/freespace.cpp (revision 6048)
+++ code/freespace2/freespace.cpp (working copy)
@@ -6539,6 +6539,19 @@
  //Game_time_compression = F1_0;
  }
 
+ /* game could be comming from a restart (rather than first start)
+ so make sure that we zero the hud gauge overrides (Sexp_hud_*)
+ \sa sexp_hud_display_gauge*/
+ if ( (old_state == GS_STATE_GAME_PLAY)
+ || (old_state == GS_STATE_BRIEFING)
+ || (old_state == GS_STATE_DEBRIEF)
+ || (old_state == GS_STATE_SHIP_SELECT)
+ || (old_state == GS_STATE_WEAPON_SELECT)
+ || (old_state == GS_STATE_RED_ALERT) )
+ {
+ Sexp_hud_display_warpout = 0;
+ }
+
  // coming from the gameplay state or the main menu, we might need to load the mission
  if ( (Game_mode & GM_NORMAL) && ((old_state == GS_STATE_MAIN_MENU) || (old_state == GS_STATE_GAME_PLAY) || (old_state == GS_STATE_DEATH_BLEW_UP)) ) {
  if ( !game_start_mission() ) // this should put us into a new state.
Index: code/hud/hud.cpp
===================================================================
--- code/hud/hud.cpp (revision 6048)
+++ code/hud/hud.cpp (working copy)
@@ -2700,7 +2700,12 @@
 {
  int warp_aborted = 0;
  // maybe make gauge active
- if ( (Player->control_mode == PCM_WARPOUT_STAGE1) || (Player->control_mode == PCM_WARPOUT_STAGE2) || (Player->control_mode == PCM_WARPOUT_STAGE3) ) {
+ if ( (Player->control_mode == PCM_WARPOUT_STAGE1)
+ || (Player->control_mode == PCM_WARPOUT_STAGE2)
+ || (Player->control_mode == PCM_WARPOUT_STAGE3)
+ || (Sexp_hud_display_warpout > 0)
+ )
+ {
  if (!hud_subspace_notify_active()) {
  // keep sound from being played 1e06 times
  hud_start_subspace_notify();
@@ -2717,6 +2722,13 @@
  return;
  }
 
+ if ( Sexp_hud_display_warpout > 1 ) {
+ if ( Sexp_hud_display_warpout < timestamp()) {
+ Sexp_hud_display_warpout = 0;
+ return;
+ }
+ }
+
  if ( Objective_display_gauge.first_frame < 0 ) {
  return;
  }
Index: code/parse/sexp.cpp
===================================================================
--- code/parse/sexp.cpp (revision 6048)
+++ code/parse/sexp.cpp (working copy)
@@ -459,6 +459,7 @@
 
  //background and nebula sexps
  { "mission-set-nebula", OP_MISSION_SET_NEBULA, 1, 1 }, //-Sesquipedalian
+ { "mission-set-subspace", OP_MISSION_SET_SUBSPACE, 1, 1 },
  { "add-background-bitmap", OP_ADD_BACKGROUND_BITMAP, 9, 9 }, // phreak
  { "remove-background-bitmap", OP_REMOVE_BACKGROUND_BITMAP, 1, 1 }, // phreak
  { "add-sun-bitmap", OP_ADD_SUN_BITMAP, 6, 6 }, // phreak
@@ -476,6 +477,7 @@
  { "hud-set-frame", OP_HUD_SET_FRAME, 2, 2 }, //WMCoolmon
  { "hud-set-color", OP_HUD_SET_COLOR, 4, 4 }, //WMCoolmon
  { "hud-set-max-targeting-range", OP_HUD_SET_MAX_TARGETING_RANGE, 1, 1 }, // Goober5000
+ { "hud-display-gauge", OP_HUD_DISPLAY_GAUGE, 2, 2 },
 
 /* made obsolete by Goober5000
  { "error", OP_INT3, 0, 0 },
@@ -714,6 +716,9 @@
 player * get_player_from_ship_node(int node, bool test_respawns = false);
 ship * sexp_get_ship_from_node(int node);
 
+// hud-display-gauge magic values
+#define SEXP_HUD_GAUGE_WARPOUT "warpout"
+
 // Goober5000 - arg_item class stuff, borrowed from sexp_list_item class stuff -------------
 void arg_item::add_data(char *str)
 {
@@ -2596,6 +2601,18 @@
  }
  break;
 
+ case OPF_HUD_ELEMENT:
+ if (type2 != SEXP_ATOM_STRING)
+ {
+ return SEXP_CHECK_TYPE_MISMATCH;
+ } else {
+ char *gauge = CTEXT(node);
+ if ( strcmp(SEXP_HUD_GAUGE_WARPOUT, gauge) == 0 ) {
+ break;
+ }
+ }
+ return SEXP_CHECK_INVALID_HUD_ELEMENT;
+
  default:
  Error(LOCATION, "Unhandled argument format");
  //Int3();  // currently unhandled argument format (so add it now)
@@ -2885,6 +2902,10 @@
  Nebula_sexp_used = true;
  Dynamic_environment = true;
  break;
+
+ case OP_MISSION_SET_SUBSPACE:
+ Dynamic_environment = true;
+ break;
 
  case OP_WARP_EFFECT:
  // type of warp is argument #11
@@ -8353,6 +8374,19 @@
  Hud_max_targeting_range = 0;
 }
 
+/* Make sure that the Sexp_hud_display_* get added to the game_state
+transitions in freespace.cpp (game_enter_state()). */
+int Sexp_hud_display_warpout = 0;
+
+void sexp_hud_display_gauge(int n) {
+ int show_for = eval_num(n);
+ char* gauge = CTEXT(CDR(n));
+
+ if ( stricmp(SEXP_HUD_GAUGE_WARPOUT, gauge) == 0 ) {
+ Sexp_hud_display_warpout = (show_for > 1)? timestamp(show_for) : (show_for);
+ }
+}
+
 // Goober5000
 // trigger whether player uses the game AI for stuff
 void sexp_player_use_ai(int flag)
@@ -9793,6 +9827,29 @@
  stars_set_nebula(eval_num(n) > 0);
 }
 
+/* freespace.cpp does not have these availiable externally, and we must call
+them so that the main simulation loop does not have to constantly check for
+Game_subspace_effect so that it could turn on the subspace sounds.
+
+Because these are in freespace.cpp there are also stubs of these functions
+in fred.cpp as it does not deal with the game loop (obviously) but still
+links against code.lib. */
+extern void game_start_subspace_ambient_sound();
+extern void game_stop_subspace_ambient_sound();
+
+void sexp_mission_set_subspace(int n)
+{
+ if (eval_num(n) > 0) {
+ The_mission.flags |= MISSION_FLAG_SUBSPACE;
+ Game_subspace_effect = 1;
+ game_start_subspace_ambient_sound();
+ } else {
+ The_mission.flags &= ~MISSION_FLAG_SUBSPACE;
+ Game_subspace_effect = 0;
+ game_stop_subspace_ambient_sound();
+ }
+}
+
 void sexp_add_background_bitmap(int n)
 {
  int sexp_var;
@@ -17360,6 +17417,11 @@
  sexp_val = SEXP_TRUE;
  break;
 
+ case OP_HUD_DISPLAY_GAUGE:
+ sexp_hud_display_gauge(node);
+ sexp_val = SEXP_TRUE;
+ break;
+
  // Goober5000
  case OP_PLAYER_USE_AI:
  case OP_PLAYER_NOT_USE_AI:
@@ -17491,6 +17553,11 @@
  sexp_val = SEXP_TRUE;
  break;
 
+ case OP_MISSION_SET_SUBSPACE:
+ sexp_mission_set_subspace(node);
+ sexp_val = SEXP_TRUE;
+ break;
+
  case OP_ADD_BACKGROUND_BITMAP:
  sexp_add_background_bitmap(node);
  sexp_val = SEXP_TRUE;
@@ -19081,6 +19148,8 @@
  case OP_SET_POST_EFFECT:
  case OP_CHANGE_IFF_COLOR:
  case OP_REMOVE_WEAPONS:
+ case OP_MISSION_SET_SUBSPACE:
+ case OP_HUD_DISPLAY_GAUGE:
  return OPR_NULL;
 
  case OP_AI_CHASE:
@@ -19197,6 +19266,7 @@
  case OP_TEAM_SCORE:
  case OP_HUD_SET_MAX_TARGETING_RANGE:
  case OP_MISSION_SET_NEBULA: //WMC
+ case OP_MISSION_SET_SUBSPACE:
  return OPF_POSITIVE;
 
  case OP_AI_WARP: // this operator is obsolete
@@ -20619,6 +20689,13 @@
  return OPF_POSITIVE;
  else return OPF_SHIP_WING;
 
+ case OP_HUD_DISPLAY_GAUGE:
+ if ( argnum == 0 ) {
+ return OPF_POSITIVE;
+ } else {
+ return OPF_HUD_ELEMENT;
+ }
+
  default:
  Int3();
  }
@@ -21065,6 +21142,9 @@
 
  case SEXP_CHECK_INVALID_FONT:
  return "Invalid font";
+
+ case SEXP_CHECK_INVALID_HUD_ELEMENT:
+ return "Invalid hud element magic name";
  }
 
  sprintf(Sexp_error_text, "Sexp error code %d", num);
@@ -21880,6 +21960,7 @@
  case OP_NEBULA_TOGGLE_POOF:
  case OP_SET_AMBIENT_LIGHT:
  case OP_SET_POST_EFFECT:
+ case OP_MISSION_SET_SUBSPACE:
  return CHANGE_SUBCATEGORY_BACKGROUND_AND_NEBULA;
 
  case OP_HUD_DISABLE:
@@ -21890,6 +21971,7 @@
  case OP_HUD_SET_FRAME:
  case OP_HUD_SET_COLOR:
  case OP_HUD_SET_MAX_TARGETING_RANGE:
+ case OP_HUD_DISPLAY_GAUGE:
  return CHANGE_SUBCATEGORY_HUD;
 
  case OP_CUTSCENES_SET_CUTSCENE_BARS:
@@ -23631,6 +23713,11 @@
  "\tTakes1 argument...\r\n"
  "\t1:\t0 for nebula off, 1 for nebula on" },
 
+ { OP_MISSION_SET_SUBSPACE, "mission-set-subspace\r\n"
+ "\tTurns subspace on/off\r\n"
+ "\tTakes 1 argument...\r\n"
+ "\r1:\t0 for subspace off, 1 for subspace on" },
+
  //-Sesquipedalian
  { OP_END_MISSION, "end-mission\r\n"
  "\tEnds the mission as if the player had engaged his subspace drive, but without him doing so.  Dumps the player back into a normal debriefing.  Does not invoke red-alert status.\r\n"
@@ -24379,6 +24466,14 @@
  "\1: Maximum targeting distance (0 for infinite)\r\n"
  },
 
+ { OP_HUD_DISPLAY_GAUGE, "hud-display-gauge <milliseconds> <gauge>\r\n"
+ "\tCauses specified hud gauge to appear or disappear for so many milliseconds.  Takes 1 argument...\r\n"
+ "\t1: Number of milliseconds that the warpout gauge should appear on the HUD."
+ " 0 will immediately cause the gauge to disappear.\r\n"
+ "\t2: Name of HUD element.  Must be one of:\r\n"
+ "\t\t" SEXP_HUD_GAUGE_WARPOUT " - the \"Subspace drive active\" box that appears above the viewscreen.\r\n"
+ },
+
  // Goober5000
  { OP_PLAYER_USE_AI, "player-use-ai\r\n"
  "\tCauses the player's ship to be controlled by the FreeSpace AI.  Takes 0 arguments.\r\n"
Index: code/parse/sexp.h
===================================================================
--- code/parse/sexp.h (revision 6048)
+++ code/parse/sexp.h (working copy)
@@ -114,6 +114,7 @@
 #define OPF_TARGET_PRIORITIES 68 // FUBAR - Target priority groups
 #define OPF_ARMOR_TYPES 69 // FUBAR - Armor type or <none>
 #define OPF_FONT 70 // Goober5000 - a FreeSpace font
+#define OPF_HUD_ELEMENT 71 // A magic name of a specific HUD element
 
 // Operand return types
 #define OPR_NUMBER 1 // returns number
@@ -575,6 +576,8 @@
 #define OP_SET_ARMOR_TYPE (0x00d2 | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) // FUBAR
 #define OP_CUTSCENES_SHOW_SUBTITLE_TEXT (0x00d3 | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) // Goober5000
 #define OP_CUTSCENES_SHOW_SUBTITLE_IMAGE (0x00d4 | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) // Goober5000
+#define OP_MISSION_SET_SUBSPACE (0x00d5 | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG)
+#define OP_HUD_DISPLAY_GAUGE (0x00d6 | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG)
 
 /* made obsolete by Goober5000
 // debugging sexpressions
@@ -840,6 +843,7 @@
 #define SEXP_CHECK_INVALID_VARIABLE_TYPE -140
 #define SEXP_CHECK_INVALID_SUBSYS_TYPE -141
 #define SEXP_CHECK_INVALID_FONT -142
+#define SEXP_CHECK_INVALID_HUD_ELEMENT -143
 
 #define TRAINING_CONTEXT_SPEED (1<<0)
 #define TRAINING_CONTEXT_FLY_PATH (1<<1)
@@ -1042,4 +1046,15 @@
 
 void multi_sexp_eval();
 
+/** Global state variables for the hud-display-gauge sexp.
+They all should be named Sexp_hud_display_*;
+They all should follow the following symantics for the value of the
+variable:
+=0 don't show
+=1 show until canceled
+>1 timestamp when gauge should stop showing (set zero when expired)
+\sa sexp_hud_display_warpout
+*/
+extern int Sexp_hud_display_warpout;
+
 #endif
« Last Edit: April 05, 2010, 12:39:03 am by Iss Mneur »
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: New s-exp request: mission-set-subspace
http://fs2downloads.com/Misc-Downloads/Builds/Subspace_SEXP_Build.7z

Build using that code. I'll fix the code for FRED a bit later.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Aardwolf

  • 211
  • Posts: 16,384
    • Minecraft
Re: New s-exp request: mission-set-subspace
How are you going to handle *exiting* subspace?

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: New s-exp request: mission-set-subspace
For the moment what I've done is just fade to white. However, if the warp-effect SEXP were modified to allow the selection of multiple warp types, I'd warp-effect a special 'exit' warp like the one Herra Tohtori designed once in front of the player ship.