Author Topic: sin(x) and cos(x) SEXPs in FRED  (Read 3747 times)

0 Members and 1 Guest are viewing this topic.

Offline Polpolion

  • The sizzle, it thinks!
  • 211
    • Minecraft
Re: sin(x) and cos(x) SEXPs in FRED
Quote
(I'm implementing a Taylor series now)

WHY

incidentally this seems as good a place as any to say taht I've been toying with the idea of trying to create SEXP libraries for FRED. You can do ****tons with SEXPs alone but last time I checked (to be fair it has been a while) there really aren't very many good mechanisms for SEXP abstraction. What you would do is define a bunch of generic SEXPs to do something (eg a minefield) and save it as, I dunno, a `.fred' file and then there would be an options screen in the mission editor for including libraries. Then whenever you wanted a minefield (or whatever) all you would have to do is include your appropriate library and use your custom SEXP. Then when you save the mission a text processor would run through your mission events and expand your custom sexp with its arguments to the actual implementation defined in the library.

only problem is that I haven't had the time to work on it any more than thinking about doing it.

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Re: sin(x) and cos(x) SEXPs in FRED
Time to SEXP up some danmakku...
(´・ω・`)
=============================================================

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: sin(x) and cos(x) SEXPs in FRED
Oh, I see what you mean.  Yes, that would require a get-[pitch/bank/heading]-to-location sexp, which is definitely doable, but not in SCP yet.
Bah, it looks like it's necessarily to make the problem more specific.  It's not possible to get a single pitch/bank/heading from an object to a given set of coordinates, because that problem has multiple solutions.

However, getting the orientation angle of a particular ship, disregarding any external points or destinations, can be done.  Use the get-object-[pitch/bank/heading] sexps.

  

Offline Shivan Hunter

  • 210
  • FRED needs lambdas!
Re: sin(x) and cos(x) SEXPs in FRED
Quote
(I'm implementing a Taylor series now)
WHY
I saw where a trig function was not, and said, "no. This will not do."

Besides, it didn't work anyway because of the aforementioned decimal problem.

Quote
incidentally this seems as good a place as any to say taht I've been toying with the idea of trying to create SEXP libraries for FRED. You can do ****tons with SEXPs alone but last time I checked (to be fair it has been a while) there really aren't very many good mechanisms for SEXP abstraction. What you would do is define a bunch of generic SEXPs to do something (eg a minefield) and save it as, I dunno, a `.fred' file and then there would be an options screen in the mission editor for including libraries. Then whenever you wanted a minefield (or whatever) all you would have to do is include your appropriate library and use your custom SEXP. Then when you save the mission a text processor would run through your mission events and expand your custom sexp with its arguments to the actual implementation defined in the library.

only problem is that I haven't had the time to work on it any more than thinking about doing it.

That sounds awesome