Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Moonsword on August 11, 2004, 01:54:10 pm

Title: Distance SEXP problem
Post by: Moonsword on August 11, 2004, 01:54:10 pm
I'm trying to get a 'distance' operator to work correctly.

I want it to fire when the player gets within 6001 meters of a certain waypoint.

Here's the SEXP:
Event
When
_<
__distance
___Alpha 2
___Waypoint Alpha
__6001
_ship-unstealth
__Arjuna 1
__Arjuna 2

The problem is, the event's firing immediately, even though Alpha 2 (the player) is over 30,000 meters from Waypoint Alpha.  Anyone know what's wrong here?
Title: Distance SEXP problem
Post by: Axem on August 11, 2004, 02:06:46 pm
Edit: Nevermind got my symbols mixed up too. ;) Yours should work. But it doesn't... for some reason. How I have done in the past is:

->
--[Number]
--distance
----Ship 1
----Ship 2

If everything is reversed like with your's it should work too then...
Title: Distance SEXP problem
Post by: Moonsword on August 11, 2004, 02:13:08 pm
Well, it's not.  That 'should work but doesn't' is the reason I posted this.
Title: Distance SEXP problem
Post by: TopAce on August 11, 2004, 02:18:19 pm
Isn't Alpha 2 accidentally within 6 kilometers at start?

or

Is Arjuna stealth by default? You know, the 'Hidden from sensors' is not enough, it may disturb stealthing though.
Title: Distance SEXP problem
Post by: Moonsword on August 11, 2004, 02:47:28 pm
Yes, it's stealthed by default.  If I force one of the other Shivan ships out of a similar SEXP, it's stealthed and undtectable.

There's a radar-set-max-range in force in this mission of 30K kilometers.  They're not visible on radar, even though they're targetable.  And, the ships are definitely stealthed, as I said above, but the stealthing is removed immediately by the mis-firing SEXPs.  'Hidden from Sensors' is not on at all.
Title: Distance SEXP problem
Post by: karajorma on August 11, 2004, 03:18:15 pm
Swap alpha 2 for alpha 3 (or another ship more than 6001m away) and see if it triggers it again. This may be a bug due to you not playing as alpha 1.
Title: Distance SEXP problem
Post by: Moonsword on August 11, 2004, 03:41:49 pm
It's not.  The problem was due to some operators I thought had been changed but actually were still out there, lurking to frustrate me and annoy the rest of you through me.

Thank you very much to those who tried to help me, I appreciate it and am glad that this community is nice enough to assist people with problems like this.  I'm feeling very stupid right now, because of this mess, but I hope the end product's worth it.
Title: Distance SEXP problem
Post by: TopAce on August 11, 2004, 03:47:16 pm
Put in a directive text if you want to make sure if the event really triggers so early. Just to make sure, even Alpha 2, or either of the Arjuna fighters could be the faulty component.
Title: Distance SEXP problem
Post by: Moonsword on August 11, 2004, 03:58:28 pm
No, no, I've already tested it and the problem was definitely with the bad operators.  Now the events are firing when they should.

I appreciate the advice, though, and I'll try to remember it if this comes up again.
Title: Distance SEXP problem
Post by: TopAce on August 11, 2004, 04:03:52 pm
Wait, if the event fires at the right time, what's the problem?
Title: Distance SEXP problem
Post by: Moonsword on August 11, 2004, 04:11:55 pm
Quote
The problem was due to some operators I thought had been changed but actually were still out there, lurking to frustrate me and annoy the rest of you through me.


I found and eliminated the problem already, and tested to make sure it was gone.

I had left in some operators by accident that were causing the problem because they don't work properly, but I didn't realize they were there until I took another close look at the SEXPs in question.  Because of the name (distance-to-nav) I didn't spot them until I realized that was what I needed to look for.
Title: Distance SEXP problem
Post by: Hippo on August 11, 2004, 04:12:00 pm
did you have a waypoint specified? it should have said waypointnamehere:#... otherwise, it checks the whole path IIRC...
Title: Distance SEXP problem
Post by: Moonsword on August 11, 2004, 04:14:19 pm
*holds up sign*

Sign reads: See above post.
Title: Distance SEXP problem
Post by: InfernoGod on August 26, 2004, 02:57:29 pm
My distance operator only asks for a name...
Title: Distance SEXP problem
Post by: Hippo on August 26, 2004, 02:58:55 pm
...

Read the walkthrough...

Spoiler:
And don't bump stuff thats already been taken care of
Title: Distance SEXP problem
Post by: InfernoGod on August 29, 2004, 05:56:32 pm
You think I didn't...