Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: LAM3O on August 12, 2003, 07:24:32 pm
-
How do i make it so a capital ship jumps out when it reaches 40% hull integrity? I've been messing with percent-destroyed-delay in the departure cue window, and i can't seem to make it work.
Thanks for your help.
-
- when
- - >
- - - 40
- - - hitpoints-left
- - - - Ship in question
- - add-goal
- - - Ship in Question
- - - - ai-warp-out
Or so - that's the basic sexp anyway.
-
Edit blackwolf's post.......> should read <. Less than 40, not greater than 40.
don't you hate typos?:D
-
Are you sure?
>
Greater than (Boolean operator)
True if first argument is greater than the second argument.
If the ships hull hits 39, then 40 will be greater than 39, and the ship will warp out... I think. These things do screw me up at times...
-
No. If you do it with greater than, it will warp out at 100 hull, because 100 is more than 40.
-
Yeah, i am sure. I use it all the time for distance between. Basically you are telling it to jump when the hull drops below 40%. so when hits left are < 40, warp.
-
< this mark is the right
so
<
hits-left
40
add-goal
ai-warp-out
89
-
Originally posted by TopAce
< this mark is the right
so
<
hits-left
40
add-goal
ai-warp-out
89
You do realize that that is exactly what I said don't you? You swapped the sign yes, but you also swapped the informations positions. The two swaps cancel each other out. Using that sign with that combination of entries is the exact equivalent of the sign I used and the combination of entries I used.
-
BW has got it right.
when
->
--40
--Hits-left
is the same as
when
-<
--hits-left
--40
What may have confused people is that BW is the only person I've ever seen who does his events that way around. Most of us use the less than modifier if we are trying to have an event triggered by a ships hull going below a certain percentage.
I certainly think it's easier to follow that way round but BW's event is nonetheless still correct.
LAM3O : The Percentage destroyed SEXP is for a completely different use. Suppose you wanted to automatically bring in another wing of fighters when most of Alpha, Beta and Gamma wings were destroyed. You would use something like
when
-Percentage-destroyed
--Alpha
--Beta
--Gamma
--80
-do-nothing
That event will trigger when 80% of the ships in those 3 wings are destroyed. Then set the reinforcements to come in when this event became true.
-
Originally posted by Black Wolf
You do realize that that is exactly what I said don't you? You swapped the sign yes, but you also swapped the informations positions. The two swaps cancel each other out. Using that sign with that combination of entries is the exact equivalent of the sign I used and the combination of entries I used.
I know