Author Topic: A FRED question  (Read 1770 times)

0 Members and 1 Guest are viewing this topic.

Offline LAM3O

  • 25
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.

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!

 - when

 -  - >
 
 -  -  - 40
 
-  -  - hitpoints-left

 -  -  -  - Ship in question

 -  - add-goal
 
 -  -  - Ship in Question

 - -  -  - ai-warp-out

Or so - that's the basic sexp anyway.
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline ShadowWolf_IH

  • A Real POF Guy
  • 211
    • CoW
Edit blackwolf's post.......> should read <.  Less than 40, not greater than 40.

don't you hate typos?:D
You can't take the sky from me.  Can't take that from me.

Casualties of War

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
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...
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline Taristin

  • Snipes
  • 213
  • BlueScalie
    • Skelkwank Shipyards
No. If you do it with greater than, it will warp out at 100 hull, because 100 is more than 40.
Freelance Modeler | Amateur Artist

 

Offline ShadowWolf_IH

  • A Real POF Guy
  • 211
    • CoW
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.
You can't take the sky from me.  Can't take that from me.

Casualties of War

 

Offline TopAce

  • Stalwart contributor
  • 212
  • FREDder, FSWiki editor, and tester

< this mark is the right
so

<
hits-left

40
add-goal

ai-warp-out
89

My community contributions - Get my campaigns from here.

I already announced my retirement twice, yet here I am. If I bring up that topic again, don't believe a word.

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Quote
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.
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

  

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
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.
« Last Edit: August 13, 2003, 06:50:12 am by 340 »
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline TopAce

  • Stalwart contributor
  • 212
  • FREDder, FSWiki editor, and tester
Quote
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
« Last Edit: August 13, 2003, 08:24:17 am by 1079 »
My community contributions - Get my campaigns from here.

I already announced my retirement twice, yet here I am. If I bring up that topic again, don't believe a word.