Author Topic: GOOBER and a supernova  (Read 3676 times)

0 Members and 2 Guests are viewing this topic.

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
GOOBER and a supernova
* Goober5000 triggers supernova-start



...Actually, maybe I should wait until the thing is actually released first.

* Goober5000 attempts supernova-stop before realizing it doesn't exist

* Goober5000 puts a supernova-stop sexp on the todo list

Why do you need it? Axem and I have done mid-mission supernova stops a bunch of times :smug:

e: actually i think it's really easy
« Last Edit: May 10, 2012, 10:05:48 pm by Iss Mneur »

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: GOOBER and a supernova
sexp elegance ftw

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: GOOBER and a supernova
pretty sure it literally takes 1 sexp already

 

Offline yuezhi

  • no u
  • 29
  • ¿¡you dare defy the commodore‽
Re: GOOBER and a supernova
yay

* headdie sets off fireworks

That all you got?

* Cobra detonates bombs

Son, I am disappoint.

* Goober5000 triggers supernova-start



...Actually, maybe I should wait until the thing is actually released first.

* Goober5000 attempts supernova-stop before realizing it doesn't exist

* Goober5000 puts a supernova-stop sexp on the todo list
*yuezhi divides by zero, invents black hole

:warp:
« Last Edit: May 09, 2012, 09:49:40 am by yuezhi »
ϟIn Neo-Terra we Trustϟ
ϟGreat Tin Can Run (Download
☭Gods and Conquerors  - mission design, tech descriptions, sounds; currently 5% Book of Invasions(reserved)☭


░░░░░░███████ ]▄▄▄▄▄▄▄▄        ︻╦╤─   Bob is building an army.
    ▂▄▅█████████▅▄▃▂          ☻/         This tank & Bob are against Google+
Il███████████████████].       /▌          Copy and Paste this all over
  ◥⊙▲⊙▲⊙▲⊙▲⊙▲⊙▲⊙◤...     / \          Youtube if you are with us!

 

Offline BritishShivans

  • Jolly good supernova
  • 29
Re: GOOBER and a supernova
Speaking of which, how do you actually set the time it takes for the supernova to hit you? I've never been able to figure that out by myself.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: GOOBER and a supernova
Speaking of which, how do you actually set the time it takes for the supernova to hit you? I've never been able to figure that out by myself.

argument on the sexp

 

Offline BritishShivans

  • Jolly good supernova
  • 29
Re: GOOBER and a supernova
Ah. I thought arguments might do something to increase the time. Getting supernovas to take really long to hit you, like in JAD was something I was never really sure of how to do. Thanks.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: GOOBER and a supernova
You just need to look at the SEXP help text in the bottom of the events window while you've got it highlighted.

  

Offline Axem

  • 211
Re: GOOBER and a supernova
pretty sure it literally takes 1 sexp already

In theory yeah. You just need to keep re-applying the supernova-start sexp (and disable the supernova text gauge). HOWEVER, all glares from stars are still gone, and the first star in the suns list will try to grow, so you need to have a repeat delay of like 1 second.

I would not be adverse to seeing a supernova-stop sexp.

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Re: GOOBER and a supernova
* Goober5000 puts a supernova-stop sexp on the todo list

Quote from: Powerman 5000
Because, supernova, your supernova, supernova goes pop. Supernova, ya' think its over but that supernova don't stop

:(
« Last Edit: May 10, 2012, 10:25:25 pm by Black Wolf »
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline CommanderDJ

  • Software engineer
  • 210
Re: GOOBER and a supernova
 :nervous:

Code: [Select]
Index: code/parse/sexp.cpp
===================================================================
--- code/parse/sexp.cpp (revision 8772)
+++ code/parse/sexp.cpp (working copy)
@@ -511,6 +511,7 @@
  { "weapon-create", OP_WEAPON_CREATE, 5, 10 }, // Goober5000
  { "ship-vanish", OP_SHIP_VANISH, 1, INT_MAX },
  { "supernova-start", OP_SUPERNOVA_START, 1, 1 },
+ { "supernova-stop", OP_SUPERNOVA_STOP, 0, 0 }, //CommanderDJ
  { "shields-on", OP_SHIELDS_ON, 1, INT_MAX }, //-Sesquipedalian
  { "shields-off", OP_SHIELDS_OFF, 1, INT_MAX }, //-Sesquipedalian
  { "ship-tag", OP_SHIP_TAG, 3, 8 }, // Goober5000
@@ -17926,6 +17927,11 @@
  supernova_start(eval_num(node));
 }
 
+void sexp_supernova_stop(int node)
+{
+ supernova_stop();
+}
+
 int sexp_is_secondary_selected(int node)
 {
  int sindex;
@@ -21679,6 +21685,11 @@
  sexp_supernova_start(node);
  break;
 
+ case OP_SUPERNOVA_STOP:
+ sexp_val = SEXP_TRUE;
+ sexp_supernova_stop(node);
+ break;
+
  case OP_SHIELD_RECHARGE_PCT:
  sexp_val = sexp_shield_recharge_pct(node);
  break;
@@ -22955,6 +22966,7 @@
  case OP_TURRET_TAGGED_CLEAR_ALL:
  case OP_SUBSYS_SET_RANDOM:
  case OP_SUPERNOVA_START:
+ case OP_SUPERNOVA_STOP:
  case OP_SET_SPECIAL_WARPOUT_NAME:
  case OP_SHIP_VAPORIZE:
  case OP_SHIP_NO_VAPORIZE:
@@ -23200,6 +23212,7 @@
  case OP_INVALIDATE_ALL_ARGUMENTS:
  case OP_VALIDATE_ALL_ARGUMENTS:
  case OP_NUM_VALID_ARGUMENTS:
+ case OP_SUPERNOVA_STOP:
  return OPF_NONE;
 
  case OP_AND:
@@ -26526,6 +26539,7 @@
  case OP_CUTSCENES_RESET_TIME_COMPRESSION:
  case OP_SET_CAMERA_SHUDDER:
  case OP_SUPERNOVA_START:
+ case OP_SUPERNOVA_STOP:
  return CHANGE_SUBCATEGORY_CUTSCENES;
 
  case OP_JUMP_NODE_SET_JUMPNODE_NAME: //CommanderDJ
@@ -29027,6 +29041,10 @@
  { OP_SUPERNOVA_START, "supernova-start\r\n"
  "\t1: Time in seconds until the supernova shockwave hits the player\r\n"},
 
+ { OP_SUPERNOVA_STOP, "supernova-stop\r\n"
+ "\t Stops a supernova in progress.\r\n"
+ "\t Note this only works if the camera hasn't cut to the player's death animation yet.\r\n"},
+
  { OP_WEAPON_RECHARGE_PCT, "weapon-recharge-pct\r\n"
  "\tReturns a percentage from 0 to 100\r\n"
  "\t1: Ship name\r\n" },
Index: code/parse/sexp.h
===================================================================
--- code/parse/sexp.h (revision 8772)
+++ code/parse/sexp.h (working copy)
@@ -678,6 +678,7 @@
 #define OP_TRIGGER_SUBMODEL_ANIMATION (0x000b | OP_CATEGORY_CHANGE2 | OP_NONCAMPAIGN_FLAG) // Goober5000
 #define OP_HUD_CLEAR_MESSAGES (0x000c | OP_CATEGORY_CHANGE2 | OP_NONCAMPAIGN_FLAG) // Swifty
 #define OP_SET_PLAYER_ORDERS (0x000d | OP_CATEGORY_CHANGE2 | OP_NONCAMPAIGN_FLAG) // Karajorma
+#define OP_SUPERNOVA_STOP (0x000e | OP_CATEGORY_CHANGE2 | OP_NONCAMPAIGN_FLAG) //CommanderDJ
 
 
 
Index: code/starfield/supernova.cpp
===================================================================
--- code/starfield/supernova.cpp (revision 8772)
+++ code/starfield/supernova.cpp (working copy)
@@ -85,6 +85,36 @@
  Supernova_status = SUPERNOVA_STARTED;
 }
 
+void supernova_stop()
+{
+ // There's no currently active supernova
+ if(Supernova_status != SUPERNOVA_STARTED)
+ {
+ return;
+ }
+
+ // We're too late.
+ if(supernova_time_left() < SUPERNOVA_CUT_TIME)
+ {
+ return;
+ }
+
+ // A supernova? In MY multiplayer?
+ if(Game_mode & GM_MULTIPLAYER) {
+ return;
+ }
+
+ Supernova_time_total = -1.0f;
+ Supernova_time = -1.0f;
+ Supernova_finished = 0;
+ Supernova_popup = 0;
+ Supernova_fade_to_white = 0.0f;
+ Supernova_particle_stamp = -1;
+
+ Supernova_status = SUPERNOVA_NONE;
+}
+
+
 int sn_particles = 100;
 DCF(sn_part, "")
 {
Index: code/starfield/supernova.h
===================================================================
--- code/starfield/supernova.h (revision 8772)
+++ code/starfield/supernova.h (working copy)
@@ -44,6 +44,9 @@
 // start a supernova
 void supernova_start(int seconds);
 
+// stop a supernova
+void supernova_stop();
+
 // call once per frame
 void supernova_process();
 
[16:57] <CommanderDJ> What prompted the decision to split WiH into acts?
[16:58] <battuta> it was long, we wanted to release something
[16:58] <battuta> it felt good to have a target to hit
[17:00] <RangerKarl> not sure if talking about strike mission, or jerking off
[17:00] <CommanderDJ> WUT
[17:00] <CommanderDJ> hahahahaha
[17:00] <battuta> hahahaha
[17:00] <RangerKarl> same thing really, if you think about it

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: GOOBER and a supernova
Committed in 8773. :)

 

Offline Cyborg17

  • 29
  • Life? Don't talk to me about life....
Re: GOOBER and a supernova
 :confused: .... How exactly does a supernova stop.  I hope I don't see use of this SEXP in a serious mission.  :P

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: GOOBER and a supernova
:confused: .... How exactly does a supernova stop.  I hope I don't see use of this SEXP in a serious mission.  :P

You already saw it in a serious mission in Vassago's Dirge, and it made perfect sense there.

 

Offline Legate Damar

  • Keeping up with the Cardassians
  • 29
  • Hail Cardassia!
Re: GOOBER and a supernova
:confused: .... How exactly does a supernova stop.  I hope I don't see use of this SEXP in a serious mission.  :P

It happened in Gene Roddenberry's Andromeda.