Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: CommanderDJ on April 28, 2011, 11:02:29 am

Title: set-jumpnode-name SEXP
Post by: CommanderDJ on April 28, 2011, 11:02:29 am
Hey guys,
So in light of this guide (http://www.hard-light.net/forums/index.php?topic=75818.new#new) created by The_E for writing new SEXPs, I decided to try my hand at writing my first ever SEXP: set-jumpnode-name.

It does what you think it does, but here's the description text anyway:
Code: [Select]
Sets the name of a jump node. Takes 2 arguments...
1: Name of jump node to change name for
2: New name for jump node

Now, I've tested it and it works, the only thing is that SEXPs referencing the old jump node name will obviously not work after the name change. That, and I have no idea whether I've done something inherently dangerous with the code. This being my first FSO coding endeavour, I need feedback, so here's (http://www.mediafire.com/?r9o4plxka9ur5sd) a link to a .patch file showing the changes I've made. Any feedback and constructive criticism is greatly appreciated.

CommanderDJ

EDIT: .patch file updated with The_E's corrections.

Title: Re: set-jumpnode-name SEXP
Post by: The E on April 29, 2011, 09:05:51 am
Committed to trunk in revision 7155.
Title: Re: set-jumpnode-name SEXP
Post by: General Battuta on April 29, 2011, 09:06:26 am
Awesome. Did DJ's note get included in the help text?
Title: Re: set-jumpnode-name SEXP
Post by: headdie on April 29, 2011, 09:20:21 am
Nice 1 CDJ
Title: Re: set-jumpnode-name SEXP
Post by: CommanderDJ on April 29, 2011, 09:40:01 am
Thanks for the commit!

I've actually updated the SEXP so it's now multiplayer compatible. I've also added the relevant note to the help text.

Here's (http://www.mediafire.com/?4sj44kc0zpf2ssj) an updated .patch file. In it, I also took the liberty of correcting a spelling error in another sexp (it used muli_sexp instead of multi_sexp).

EDIT: Thanks headdie.
Title: Re: set-jumpnode-name SEXP
Post by: Echelon9 on May 01, 2011, 09:55:57 am
Alternative solution provided by The_E