Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: LoneKnight on August 24, 2011, 10:32:54 am
-
I have a when-true SEXP that calls for a particular friendly squadmate to have Ship-Guardian-Threshold, due to a scripted line they have to say at a point. However, time and time again when enemies arrive he gets blown to smithereens. There are a handful of other fighters that have guardian on, and they appear fine. I know that guardian won't necessary kick in immediately, but the ship in question is being destroyed by fighters at a reasonable speed. I even bumped the threshold to 45.
$Formula: ( when
( true )
( ship-guardian-threshold
25
"Alpha 2"
)
( ship-guardian-threshold
33
"Alpha 4"
)
( ship-guardian-threshold 27 "Beta 1" )
( ship-guardian-threshold 31 "Beta 2" )
( ship-guardian-threshold 29 "Beta 3" )
( ship-guardian-threshold 45 "Rage 1" )
)
+Name: EVE_Guardian
+Repeat Count: 1
+Interval: 1
+Team: 34275328
The only thing I figured might cause it is that Rage 1 (the ship in question) arrives later in the mission?
Thanks, any enlightenment would be appreciated. I'd rather not have to make him invincible.
-
*SNIP*
The only thing I figured might cause it is that Rage 1 (the ship in question) arrives later in the mission?
That's probably the issue. Just create another Sexp to fire when he arrives.
Also, something you might try to make it a little more believable is something like this.
$Formula: ( when
( true )
( ship-guardian-threshold
( rand-multiple 15 33 )
"Alpha 1"
)
)
-
( ship-guardian-threshold
( rand-multiple 15 33 )
Woah now. Daddy likes.
-
Try this.
$Formula: ( when-argument
( any-of
"Ship 1"
"Ship 2"
"Ship 3"
"Ship 4"
"ETC"
)
( has-arrived-delay 0 "<argument>" )
( ship-guardian-threshold
( rand-multiple 15 33 )
"<argument>"
)
(invalidate-argument)
)
Note because of 'has-arrived-delay' this won't trigger for ships that are in mission at the start. For that you will need 'true'. So set up two sexps like this one, one with 'True' for start of mission ships and one with 'has-arrived-delay' for any ships that arrive later.
Also, give it a high trigger count and interval of 0.
-
Yeah the fact that they hadn't arrived was the cause.