Well here's yet another new conditional/String variable oddity for me to bother Goober with
Lets say I make an event like this.
Every-time-argument
-every-of
--Beta 1
--Beta 2
--Beta 3
-true
-send-message
--< argument >
--high
--Message
All three ships will send the message. However if I do this
Every-time-argument
-every-of
--Beta 1
--Beta 2
--Beta 3
-true
-modify-variable
--StringVariable[Ship]
--< argument >
-send-message
--StringVariable[Ship]
--high
--Message
Only the first one sends the message (FRED also complains about the message source being invalid but it works in game). So is this a bug or am I doing something wrong again?
#2
Doh! I think I've puzzled it out and if I'm right it was me being stupid.
Only the SEXPs that have < argument > in them are duplicated, right? Any SEXP using an argument is executed once for every argument. Anything else is only executed once.
Oh well I've got a better one now. This one is really odd. Can you use the when SEXP from within every-time-argument? I seem to be getting very weird behaviour when I try. Take a look at this.
I have 3 ships with different classes in Beta wing. Beta 2 is an Ares class.
Here's the event in question.
And here's the behaviour which quite frankly is puzzling the hell out of me.
If I shoot Beta 2 below 50% the variable will update to the current hitpoints of Beta 2 as expected. Until I shoot Beta 1 at that point the variable is set to the current hitpoints of Beta 1 even though Beta 1 is not an ares class and therefore should never trigger the when.
If I shoot Beta 1 below 50% first the variable records damage to Beta 1 (but only once I have also shot Beta 2 below 50%) regardless of whatever I go on to do to Beta 2.
If I shoot Beta 3 below 50% first the variable will never change regardless of who I shoot next.
Changing from every-time-argument to a repeating when-argument has no effect on this behaviour.
If anyone fancies scratching their head trying to figure out what in hell FS2 is doing here's the mission.
Only the SEXPs that have < argument > in them are duplicated, right? Any SEXP using an argument is executed once for every argument. Anything else is only executed once.
Oh well I've got a better one now. This one is really odd. Can you use the when SEXP from within every-time-argument? I seem to be getting very weird behaviour when I try. Take a look at this.
I have 3 ships with different classes in Beta wing. Beta 2 is an Ares class.
Here's the event in question.
And here's the behaviour which quite frankly is puzzling the hell out of me.
If I shoot Beta 2 below 50% the variable will update to the current hitpoints of Beta 2 as expected. Until I shoot Beta 1 at that point the variable is set to the current hitpoints of Beta 1 even though Beta 1 is not an ares class and therefore should never trigger the when.
If I shoot Beta 1 below 50% first the variable records damage to Beta 1 (but only once I have also shot Beta 2 below 50%) regardless of whatever I go on to do to Beta 2.
If I shoot Beta 3 below 50% first the variable will never change regardless of who I shoot next.
Changing from every-time-argument to a repeating when-argument has no effect on this behaviour.
If anyone fancies scratching their head trying to figure out what in hell FS2 is doing here's the mission.