Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: BS403 on March 12, 2008, 01:27:42 pm

Title: Questions
Post by: BS403 on March 12, 2008, 01:27:42 pm
How do I setup an event so it occurs every time a button is pressed not just the first time?

And which sexps do i use so the enemy won't notice/ attack you?
Title: Re: Questions
Post by: FUBAR-BDHR on March 12, 2008, 01:35:55 pm
Don't have the exact syntax but it's something like this

everytime
  key-pressed
    <key>
  <whatever you want to do>
  key-reset
   <key>

Those sexp's are in the training section but can be used in a regular game.
Title: Re: Questions
Post by: BS403 on March 12, 2008, 01:40:28 pm
KK thanks i forgot the everytime.
Title: Re: Questions
Post by: Mobius on March 12, 2008, 01:46:25 pm
Use protect-ship to make sure that the enemy don't notice you and unprotect-ship to get the opposite effect :)
Title: Re: Questions
Post by: karajorma on March 12, 2008, 02:38:46 pm
Don't have the exact syntax but it's something like this

everytime
  key-pressed
    <key>
  <whatever you want to do>
  key-reset
   <key>

Those sexp's are in the training section but can be used in a regular game.

Use key-reset-multiple or you'll get some very odd bugs. Not that you won't get very odd bugs anyway as the key-pressed SEXP is very temperamental about which keys it works with which you start using it in repeated events.