Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Zarax on July 30, 2002, 10:01:26 am

Title: Need FRED Help
Post by: Zarax on July 30, 2002, 10:01:26 am
Hello, i think this is the right place...
I have a FRED scripting problem...
How can i make trough sexp this condition?

when player distance is less than (value)
do something

Thanks in advance,
                                 Zarax
Title: Need FRED Help
Post by: StratComm on July 30, 2002, 10:13:47 am
when
-<
--distance
---Alpha 1
---Object (distance from what)
--#(Distance at which SEXP is to be activated)
-do whatever

I think that is right.
Title: Need FRED Help
Post by: Zarax on July 30, 2002, 10:28:14 am
Thanks.
Now, what if i want to separately scan a ship's subsystems?
Title: Need FRED Help
Post by: StratComm on July 30, 2002, 11:07:47 am
As far as I can tell, only certain ships can have scannable subsystems, but you may take a closer look at mission SM2-08.fs2 to get a clearer picture.
Title: Need FRED Help
Post by: Zarax on July 30, 2002, 11:17:42 am
Well, i have still a small problem :D
i did this sexp

when
<
distance
Alpha 1
Enemy wing
2500
or
<
distance
Alpha 1
Enemy Ship (not in wing)
2500
As arrival cue for some fighter wings.
It doesn't work though...
Can anyone tell me where the error is?
Title: Need FRED Help
Post by: karajorma on July 30, 2002, 11:21:51 am
Destroyers or above can have seperately scanable systems. Don`t know about smaller craft but I don`t think any of the smaller ships can have them.

As for the other problem it's probably something wrong with your arrival cue since the SEXP looks fine to me. If that still doesn`t work try.


when
-<
--distance
---Alpha 1
---Any Hostile
--2500
-do whatever

And see if that works. If not
Title: Need FRED Help
Post by: Kellan on August 02, 2002, 11:00:10 am
You certainly don't need both parts of the s-exp you wrote; and they may be conflicting with one another to produce no effect at all. That is, if "enemy ship" is any enemy ship rather than the SD Ballyhoo, or whatever.