Author Topic: Killing the engines  (Read 2042 times)

0 Members and 1 Guest are viewing this topic.


The latest in a long string of embarassing questions...

How do I "turn off" the engine glow effect?  My idea is to have a mission where the player can press a key and essentially shut down the fighter - including its engines - and "drift" (via use-ai) towards a specific waypoint to avoid detection.  I need to get those damn engines to stop glowing.

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
sabotage the engine subsystem. as in, blow it up.
(´・ω・`)
=============================================================

 
sabotage the engine subsystem. as in, blow it up.

        Won't that sort of, stop the "ai" from flying the ship to wherever it needs to go?

 
Right, I know about that, but I need the ship to still be able to MOVE - albeit in a straight line under AI command - but to move without engine glow.

 

Offline Solatar

  • 211
Have the player point towards the target, turn on glide, THEN kill the engines?

 

That sounds like it would work, but my main issue is designing a SEXP that allows me to turn the engines on and off with a single keystroke (I picked the W key).  I'm trying the "every time" arguments to absolutely no avail!

 

This is the command I'm trying with great frustration to implement.  I have to be doing something wrong...



[attachment deleted by admin]

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Here's a version using scripting. But it won't work until my next build.

Code: [Select]
#Conditional Hooks
$Application: Freespace 2
$Keypress: w
$On Key Released: [
local player = mn.Ships['Alpha 1']

--If player is alive
if player:isValid() then
local engine = player['engine']
--And player has an engine subsystem
if engine:isValid() then
--If the keypress hasn't been used
if not g_PlayerEngineHitpoints then
--Save current engine hitpoints remaining
g_PlayerEngineHitpoints = engine.HitpointsLeft
--Set engine hitpoints to 0
engine.HitpointsLeft = 0
else
--Keypress has been used, restore player engine hitpoints
engine.HitpointsLeft = g_PlayerEngineHitpoints
--Reset stored hitpoints
g_PlayerEngineHitpoints = nil
end
end
end
]
#End
-C

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ

This is the command I'm trying with great frustration to implement.  I have to be doing something wrong...



There is a good possibility you simply picked the wrong key to map it to. Key-reset is noticeably twitchy about how it reacts in repeating events with every-time. 
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Good call, it does seem to be just a problem with the 'w' key.  I think that this, plus the gliding option, will solve this issue, HOWEVER...is it possible to force the AI-controlled ships (i.e. my copilots) to use glide as well?  I want us all to go cruising through space in drift mode, no engine flames or exterior lights...

 

Ok, since I now know that AI can't use glide...how about this question:

By what means or program can I edit or REMOVE the engine flow from a specific ship?  My plan is now to have my copilots change ship classes midmission, giving them the illusion of drifting while the player actually does.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
You'd need to extract and edit the pof file and then swap it for one with no engine subsystem. Then you can use the change-ship-class SEXP to make this work.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

I ended up just using the custom thruster lines in the ships.tbl file, and leaving the bitmap lines blank.  This did away with all engine glow.  Then I used the change ship class trick.