Author Topic: Ignoring Previous Distance Checks  (Read 2216 times)

0 Members and 1 Guest are viewing this topic.

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Ignoring Previous Distance Checks
Here's the situation, I've got a string of events that I want to trigger, based on the player's proximity to a certain ship, but only from a certain point in time onwards.  I'd like it to wait until a certain event has occurred before performing the distance check, unfortunately if the player enters the proximity zone before the event check occurs, it will consider the distance check fulfilled, and begin the sequence as soon as the event check has triggered.  I'd like to be able to tell it to ignore all previous instances of proximity and ONLY look for it once the other half of the event trigger has occurred.

Is there any way to do this in FRED (without resorting to scripting), or would this require further SCP additions?
The Trivial Psychic Strikes Again!

 
Re: Ignoring Previous Distance Checks
I believe and-in-sequence is for checks like this.

Failing that, you should be able to rig something together with variables. Create a new event (with a high trigger count) that sets a variable to 1 when the distance check is satisfied, and reset it to zero as part of the event that the old distance check event is chained to. Then have the old distance check event check the variable value instead of the distance. This wouldn't work for exactly the same reason what you're doing now doesn't work, and-in-sequence is your friend.
« Last Edit: December 05, 2011, 01:55:02 am by LordPomposity »

 
Re: Ignoring Previous Distance Checks
Or just use two chained events, put the other trigger in the first and chain the distance check to it.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Ignoring Previous Distance Checks
Here's the situation, I've got a string of events that I want to trigger, based on the player's proximity to a certain ship, but only from a certain point in time onwards.  I'd like it to wait until a certain event has occurred before performing the distance check, unfortunately if the player enters the proximity zone before the event check occurs, it will consider the distance check fulfilled, and begin the sequence as soon as the event check has triggered.  I'd like to be able to tell it to ignore all previous instances of proximity and ONLY look for it once the other half of the event trigger has occurred.

Eh?

That's not how the distance SEXPs work at all. If the ship moves into distance and then back out again while the second half of the trigger is not complete then the game will not automatically trigger the event as soon as the second half is complete. The ship must get back in range before the entire event will trigger. The only way you can get the distance SEXPs to behave the way you say they are behaving AFAIK is by using the "not" SEXP. That can lead to somewhat unexpected behaviour.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Ignoring Previous Distance Checks
It sounds like there's more information that isn't being provided, but at first glance you could chain events to accomplish this.

  

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: Ignoring Previous Distance Checks
Well, I've already tried the and-in-sequence thing for something else in the same mission and it still only works if the distance check hasn't been fulfilled before.  I've got an event that is supposed to trigger when the player gets within a close range of any one of a number of objects (I'm using a when-argument rather than a whole bunch of "or" instances), but not until after another event has triggered.  If the distance factor has already been fulfilled by the time the hook event has triggered, then it will simply refuse to trigger that event because it was achieved BEFORE the hook event rather than after it.

I won't be able to chain the events per se, as my mission has two similar player choice sequences.  If the player approaches ship A, then it fires off a chain of messages, objectives, and other actions.  It the player approaches ship B, then it fires off another chain, similar to the other but tailored to the different ship targeted.  I can't "chain" it off a single event, but I have added in an is-event-true-delay to each branch trigger, linking off to the last event before one of the sequences can fire.  I haven't tested it with this in yet.

We'll see.
The Trivial Psychic Strikes Again!

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Ignoring Previous Distance Checks
Based on the bit of info you've given, it sounds like you are making it more complicated than it needs to be.

Why not use a variable to keep track of the mission's "scene"? Start the variable at '1' and then when the hook is triggered set it to '2' and have a check for that with your distance trigger. Then you can set that variable to something else to keep track of which branch you are on. I've done similar things this way and it works like a charm.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Ignoring Previous Distance Checks
Can you just post the event that's giving you problems?