Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: karajorma on February 25, 2007, 04:05:25 am

Title: Event Triggering Strangeness
Post by: karajorma on February 25, 2007, 04:05:25 am
I first noticed this in BtRL but I can reproduce it in FS2.

I make a mission like this (this it the easiest I can make the problem)

Event 1
-true
-do-nothing

Event 2
-not
--is-event-true-delay
--0
--Event 1
-do-nothing

Event 3
-or
--is-event-false-delay
---0
---Event 1
--is-event-incomplete
---Event 1
-do-nothing


Now looking at that I should only get event 1 to trigger. However if I try the mission in 3.6.9 Event 1 and 2 both trigger. If I try it in FS2 Retail both event 1 & 2 trigger but in reverse order.

:wtf:

Anyone know what's going on?

Here (http://homepage.ntlworld.com/karajorma/Misc-Downloads/EventTriggetTest.rar)'s the mission in case anyone wants to check.
Title: Re: Event Triggering Strangeness
Post by: Turey on February 25, 2007, 04:43:31 am
Do they trigger with a noticable delay?

Just a wild guess here, but maybe the first event has to be true for one frame before is-event-true-delay triggers.

So you'd have:
Frame 1: Both events trigger, as true is obviously true, but it takes FS2 a frame to realize that Event 1 is true.
Frame 2:Event one is registered as completed.

Gah. It's probably not right. I shouldn't even be posting at 2:40 AM.  :o
Title: Re: Event Triggering Strangeness
Post by: karajorma on February 25, 2007, 07:27:17 am
I can see your point Turey but in that case Event 3 should also trigger. If the game only registers events as true after working through the entire list then Event 1 should still be flagged as incomplete and therefore should trigger Event 3.

I wouldn't have a problem if both event 2&3 would trigger but the fact that they aren't triggering at the same time is distinctly odd. And that's before we get to the fact that this isn't the retail behaviour.
Title: Re: Event Triggering Strangeness
Post by: FUBAR-BDHR on February 25, 2007, 11:39:00 am
Did some testing with that file.  First time I ran it I received the event 1 message then the event 2 message.  I then changed the message priority to low for event 1 message, normal for event 2 message and high for event 3 message.  This time I received event 2 message first then event 1 message.  Changing the priority around for event 1 and 2 message resulted in event 1 message first again. 

That still doesn't explain why it's doing what it's doing but it seems that both events are triggering at the same time and it's only the message priority that changes which message comes up first.  The only thing I can think of is it starts processing the next event before it finishes processing the previous event.  Either that or 0 doesn't really equal 0 in FS2. 
Title: Re: Event Triggering Strangeness
Post by: Snail on February 25, 2007, 11:43:38 am
Perhaps it is evaluating Event 2 before Event 1 for some reason.