Author Topic: How to apply SEXPs to Events in FRED?  (Read 1143 times)

0 Members and 1 Guest are viewing this topic.

Offline emark4

  • 27
How to apply SEXPs to Events in FRED?
I am not sure how to apply an event into fred. Trying to copy and paste a piece of code to make a capship mission.

Can someone point me to the right direction regarding SEXPs? The help directions in fred don't show how to paste an SEXP. Like where am I suppose to get a SEXP?

Thanks.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: How to apply SEXPs to Events in FRED?
Go to event editor

Create a new event

It should say 'when true, do nothing'

Right click on 'true' to alter the conditions

Right click on 'do nothing' to alter what it does

Right click and use 'add operator' to add new conditionals or functions

Look at existing missions in events editor to get a better sense of how it all works and the fancy **** you can do.

Do the FRED tutorial.

  

Offline 0rph3u5

  • 211
  • Reality is the finest flesh...
    • Steam
    • Twitter
Re: How to apply SEXPs to Events in FRED?
Trying to copy and paste a piece of code to make a capship mission.

I highly advise trying to make it on your own instead of just C&P'ing it from somewhere ... that way you at least know how you made it and where to debug.

But if you are intend on that - you cannot C&P events or SEXP from one mission to another (let the coders explain why FRED doesn't have that kind of functionality), unless you are using a text editor like Notepad/Editor.

Once you have that open you need to find the section "#Events" in the file, which comes after all objects and wings that in the mission file. There you will find the data you can C&P into another mission file for any event - It is important that variable data which might be required for some events is stored elsewhere in the file ("#Sexp_variables").

Also events in the text output are formated differently from the output you will have in FRED; it starts with "$Formula" which are the event's conditions and operators, other information like the name of the event ("+Name") are at the end. So it is basically the reverse of the visual output you have in FRED (more or less, actually less).
"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."