Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: wistler on April 14, 2009, 10:13:55 am

Title: How to make a ship stealthy to the enemy?
Post by: wistler on April 14, 2009, 10:13:55 am
What features do I need to make the players ship stealthy from an AI enemy. I'm really looking for the ship to be invisible unless the primaries/secondaries are fired.

I assume it would involve writing a variable that will always come true if weapons are fired but... I'm not sure how to do it   :shaking:

(I'm pretty much looking to recreate the features of the Pegasus being invisible onto a stealth bomber).
Title: Re: How to make a ship stealthy to the enemy?
Post by: karajorma on April 14, 2009, 10:27:28 am
The ship-stealthy SEXP? The ship stealthy flag in the Ship Editor->Misc Properties?

:D
Title: Re: How to make a ship stealthy to the enemy?
Post by: wistler on April 14, 2009, 10:35:51 am
ha  :p I'll try opening my eyes next time.

I'm writing an event where the ship becomes un-stealthy when x distance from enemy. Could I have that argument become untrue when the distance becomes y and have the ship stealthy again. And is there a way to make that event repeating, so it constantly becomes true and untrue throughout the mission?

(i suprise myself with the fact that English is actually my first language  :lol:)
Title: Re: How to make a ship stealthy to the enemy?
Post by: Enioch on April 14, 2009, 12:19:17 pm
You'll need 2 SEXPs:

Quote
When
 |-<
 |   |--distance
 |   |     |---whatever the stealthy fighter is
 |   |     |---<any hostile>     
 |   |--500                                ----->note: replace with actual distance in meters for ship to become un-stealthy
 |-ship-unstealthy
      |-whatever the stealthy fighter is

and

Quote
When
 |->
 |   |--distance
 |   |     |---whatever the stealthy fighter is
 |   |     |---<any hostile>     
 |   |--500                                ----->note: replace with actual distance in meters for ship to become stealthy
 |-ship-stealthy
      |-whatever the stealthy fighter is

give each of them a repeat count of 999 and you're all set. Hell, I doubt there will be any chance a player will fly in and out of range more than 999 times... :p
Title: Re: How to make a ship stealthy to the enemy?
Post by: wistler on April 14, 2009, 01:44:42 pm
I sort of worked out how to do it but thanks for the reply, good to know I'm on the right track  :). How do I give something a repeat count?
Title: Re: How to make a ship stealthy to the enemy?
Post by: Angelus on April 14, 2009, 02:21:51 pm
I sort of worked out how to do it but thanks for the reply, good to know I'm on the right track  :). How do I give something a repeat count?

Highlight the event you want to be repeated, then check the "Repeat Count" box right next to the event window.