Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Cobra on October 11, 2005, 06:35:45 pm

Title: FREDing Question(s)
Post by: Cobra on October 11, 2005, 06:35:45 pm
I'm in a FREDing funk and I'm making a mission to get out of it so i can make some mission for Pathways. The mission features you as a captain of a Deimos-class corvette.

anyway, I'm wondering what SEXP's i should use to beam-free-all my corvette by pressing a key, and if you press the key again it would lock the beams.

another question i have for the same mission would be how to set the warpout speed for the deimos so it doesn't warp in all slow like. looks ugly. :ick:
Title: FREDing Question(s)
Post by: karajorma on October 11, 2005, 06:50:14 pm
For the second one look at this (http://207.38.10.121/~freespace/forums/showthread.php?s=&threadid=35685) thread.

For the first one you need to use two events.

Key Pressed When Beams Are Off
Every-time
-and
--Key-Pressed
---Key
- =
--KeyPressed(0)
--0
-Key-Reset
--Key
-Modify-Variable
--KeyPressed(0)
--1
-Beam-Free-All
--ShipName


Key Pressed When Beams Are On
Every-time
-and
--Key-Pressed
---Key
- =
--KeyPressed(0)
--1
-Key-Reset
--Key
-Modify-Variable
--KeyPressed(0)
--0
-Beam-Lock-All
--ShipName

By setting a variable you allow the SEXPs to know whether the beams are turned on or off
Title: FREDing Question(s)
Post by: Cobra on October 11, 2005, 07:08:22 pm
i knew i needed two events and a variable, but i wasn't sure how i would go about them.
Title: FREDing Question(s)
Post by: StratComm on October 11, 2005, 07:13:07 pm
I'm curious to know how you're planning on discouraging players from just leaving their beams on.  While Kara's solution works, it doesn't account for any limiting factor on beam useage.
Title: FREDing Question(s)
Post by: Cobra on October 11, 2005, 07:14:29 pm
well, what about IFF's being changed? this would work for that. ;)

[EDIT] OK, how do i do this?

the modify variable part. how do i go about this? o_O

Quote
-Key-Reset
--Key
-Modify-Variable
--KeyPressed(0)
--1
-Beam-Free-All
--ShipName
Title: FREDing Question(s)
Post by: Trivial Psychic on October 11, 2005, 08:20:12 pm
Quote
Originally posted by karajorma
For the second one look at this (http://207.38.10.121/~freespace/forums/showthread.php?s=&threadid=35685) thread.

I haven't had any success with this feature.  Read my newest post there.
Title: FREDing Question(s)
Post by: karajorma on October 12, 2005, 03:21:02 am
Quote
Originally posted by Cobra
well, what about IFF's being changed? this would work for that. ;)

[EDIT] OK, how do i do this?

the modify variable part. how do i go about this? o_O

 


How do you make and use variables you mean?

http://homepage.ntlworld.com/karajorma/freespace/fredretail.html#variables

That should cover it :)
Title: FREDing Question(s)
Post by: Cobra on October 12, 2005, 09:24:37 am
no no, not that. I mean the modify variable part. after i put in the key reset SEXP, what do i do after that? that's what confused me.
Title: FREDing Question(s)
Post by: Singh on October 12, 2005, 09:31:01 am
depending on how many fighters you have, there might be another way of going about it using the if-any argument and then have it target specific fighters only...but I don't think there is an is-ship-targetted sexp yet.
Title: FREDing Question(s)
Post by: karajorma on October 12, 2005, 10:09:01 am
Quote
Originally posted by Cobra
no no, not that. I mean the modify variable part. after i put in the key reset SEXP, what do i do after that? that's what confused me.


Modify variable is a SEXP. It lives in change>>Special. Read the link I gave you. It covers this sort of stuff in some detail.

Quote
Originally posted by Singh
depending on how many fighters you have, there might be another way of going about it using the if-any argument and then have it target specific fighters only...but I don't think there is an is-ship-targetted sexp yet.


There is. It's one of the training SEXPs so I had to check I wasn't fooling myself into believing it exists but it does.
Title: FREDing Question(s)
Post by: Luigi30 on October 12, 2005, 11:25:27 am
Hey! You stole my idea! Oh well, I'll just change Deimos to Fenris.

Also, don't use fire-beam unless you want this (http://www.hard-light.net/forums/index.php/topic,35696.0.html) to happen.
Title: FREDing Question(s)
Post by: karajorma on October 12, 2005, 01:00:46 pm
Seeing as how people have been making missions where you fly a capship since FS1 came out I don't think you can say it's your idea :)
Title: FREDing Question(s)
Post by: Cobra on October 12, 2005, 02:50:01 pm
Quote
Originally posted by Luigi30
Hey! You stole my idea! Oh well, I'll just change Deimos to Fenris.

Also, don't use fire-beam unless you want this (http://www.hard-light.net/forums/index.php/topic,35696.0.html) to happen.


so? if i finish the mission maybe i'll let you have it. :p

[EDIT] @ Kara: Really? I didn't see it. *checks SEXP list*