Author Topic: SEXP hits-left-subsystem Question  (Read 7625 times)

0 Members and 1 Guest are viewing this topic.

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Re: SEXP hits-left-subsystem Question
Now that I think about it, I sometimes did run into problems getting specified turrets on ships to stay alive using a repeating event that reset the turret's strength whenever it fell too low. I always assumed that the strength was going down too fast for the event to fire in time, but this would explain it. This was back in the retail days, when we didn't have ship-subsys-guardian-threshold.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: SEXP hits-left-subsystem Question
EDIT: On further thought, maybe we should "fix" it, even though it would change the original behavior.  The reason is that this bug will show up in a very small number of cases: those being sexps which refer to a subsystem type that has more than one instance on the model (most likely engines or turrets).  Ninety-nine percent of those cases would use is-subsystem-destroyed, leaving 1% questionable.  That 1% might be a small enough margin to risk experimenting on. :)

What I did (eventually :rolleyes:) was add a 3rd argument.

By default the game will how the usual behavior. If you supply the 3rd argument (and it evaluates to true) then the game ignores type and simply works out the actual hits left of the subsystem mentioned. That way there is no need to alter the default behaviour and FREDders can still easily get what they probably want to happen.

One reason I was reluctant to actually fix it because of the way the SEXP is used in Argonautica. The SEXPs appear to repair the engine sequentially but cause of the weird design of the SEXP they'll all be repaired at the same time. It's obvious the mission has been balanced for that and if it suddenly starts taking longer to get the engines all working again that could have knock on effects. Especially if that thing about engines having to be at 30% for warpout hasn't been fixed yet. 


Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Re: SEXP hits-left-subsystem Question
I wouldn't like fixes like that since we'll get newbies popping up everywhere screaming about it.

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: SEXP hits-left-subsystem Question


I'd use the other thread but N00ber5000 locked it. :doubt:

That 3.6.10 build doesn't solve the problem. I have Snail's same problem in the same mission. Only difference is the value, lowered to about 50.
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: SEXP hits-left-subsystem Question
Did you add the 3rd argument?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Re: SEXP hits-left-subsystem Question
I told him over MSN but he doesn't seem to get the point.

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: SEXP hits-left-subsystem Question
You mean:

-and
--hits-left-subsystem
<
<value>

--not
is-subsystem-destroyed-delay

etc. etc.


?
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Re: SEXP hits-left-subsystem Question
Yep, I think that's how it works.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: SEXP hits-left-subsystem Question
No. I mean

-hits-left-subsystem
--Ship
--Subsystem
--TRUE

If you miss the 3rd argument it goes back to being false and you end up with the strange effects I mentioned in my earlier posts.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: SEXP hits-left-subsystem Question
That

+

-and
--hits-left-subsystem
<
<value>

?
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: SEXP hits-left-subsystem Question
That's not even possible. FRED simply won't accept that. Do what I posted. Add the third parameter and set it to true.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: SEXP hits-left-subsystem Question
Aaah, my mistake! The 3rd argument of the SEXP!!!

Thanks! :yes:
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito