Author Topic: Event Repetition Confusion  (Read 1254 times)

0 Members and 1 Guest are viewing this topic.

Offline NeonShivan

  • Previously known as BTA
  • 29
  • By the Omnisiah's grace.
Event Repetition Confusion
For a mission I am attempting to replicate (to the best of my ability, which isn't much) the effects of ESM from the Ace Combat series in Freespace. Seeing as my skills as a mission designer are, mediocre at best I am having a bit of trouble getting it to properly work.

So far my idea was to try to get the events set up as:

If player gets within X range of (for sake of arguement we'll say "ESM Test") ESM Test, the ESM effects take hold.

and once the player exits the range, the effects are lifted.

And these would repeat every time the player enters and exits the field.

Problem is, what I've attempted to do was something quite silly:



While this is my current set up, initially the ESM Uplink event was set to "every-time" instead of "every-time-arguement"

When set to "every-time" with a trigger count, the event would constantly repeat despite exiting the range.

With this set up, the event would only trigger once due to "invalidate arguement" (Well, it was there... under the "ESM Uplink event")

Now to put an end to this wall of text: How would I go about replicating this effect properly using FRED.

In German even the most beautiful love letter sounds like an execution order -Mito

(•_•)
 <)  )/
 /  \ All the Single Ladies

( •_•)
\(  (>
  /  \ All the Single Ladies

(•_•)
 <)  )/
 /  \  Oh Oh Oh

Author of Dusk Wars - A modification for Freespace 2.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Event Repetition Confusion
I would need to actually see the trigger for both events in order to advise what is wrong with what you currently have. At the moment I can only see the any-of and <= SEXPs and not what is inside them.

That said, I can see some possible causes already. Why are you using every-time (or every-time-argument) for this one? Personally I'd use a when-argument and a trigger count. Set the length of the interval to the minimum time you want the ESM effect to last. Set the number of triggers to a very high number.

I've not played Ace Combat so I'd need to know what ESM is to offer more useful advice than that.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline NeonShivan

  • Previously known as BTA
  • 29
  • By the Omnisiah's grace.
Re: Event Repetition Confusion
http://acecombat.wikia.com/wiki/Electronic_Support_Measures

How ESM works in a nutshell



Here's what inside the events

Originally "invalidate-argument" was under the first event, not the last one.
In German even the most beautiful love letter sounds like an execution order -Mito

(•_•)
 <)  )/
 /  \ All the Single Ladies

( •_•)
\(  (>
  /  \ All the Single Ladies

(•_•)
 <)  )/
 /  \  Oh Oh Oh

Author of Dusk Wars - A modification for Freespace 2.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Event Repetition Confusion
Why does the second event use when if the first one uses every-time-argument? What's the repeat count for the when event? If they don't match, you can see why the event to turn ESM off wouldn't trigger more than once. As soon as the mission starts (assuming the ship starts more than 4km from the ESM Test object) the last SEXP will trigger repeatedly until it runs out of triggers.

One better way to do this is to also set a variable and test for that as well as distance. Create a variable called "ESM Active" and set to 0 by default then make sure that it is set to 1 whenever the ESM is turned on.

Code: [Select]
when
- and
-- <
--- distance
---- Alpha 1
---- ESM Test
--- 4000
-- =
--- ESM_Active[0]
--- 0
- Modify_variable
-- ESM Test
-- 1
... All the turn on ESM stuff


when
- and
-- >=
--- distance
---- Alpha 1
---- ESM Test
--- 4000
-- =
--- ESM_Active[0]
--- 1
- Modify_variable
-- ESM Test
-- 0
... All the turn off ESM stuff
---

Give both events a high trigger count and suitably short interval time and that should work perfectly for you.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

  

Offline NeonShivan

  • Previously known as BTA
  • 29
  • By the Omnisiah's grace.
Re: Event Repetition Confusion
Thank you very much Karajorma this works perfectly.
In German even the most beautiful love letter sounds like an execution order -Mito

(•_•)
 <)  )/
 /  \ All the Single Ladies

( •_•)
\(  (>
  /  \ All the Single Ladies

(•_•)
 <)  )/
 /  \  Oh Oh Oh

Author of Dusk Wars - A modification for Freespace 2.