Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started 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
-
when
-<
--distance
---Alpha 1
---Object (distance from what)
--#(Distance at which SEXP is to be activated)
-do whatever
I think that is right.
-
Thanks.
Now, what if i want to separately scan a ship's subsystems?
-
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.
-
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?
-
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
-
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.