Author Topic: Multiple explosions using when-argument take 2  (Read 1584 times)

0 Members and 1 Guest are viewing this topic.

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Multiple explosions using when-argument take 2
The old topic http://www.hard-light.net/forums/index.php/topic,56469.0.html when off track so I started a new one.

My test mission only contained 3 explosions and worked just fine.  I added in 21 more sets of values.  For some reason I can't quite figure out the first 6 explosions occur where they are supposed to.  The rest look like they just show up at explosion 6's location.  Stripped it back down to a test mission and it does the same thing.  According to the messages the values are getting set but I don't know what to.  Either I'm missing something stupid or I've hit a new problem. 

Basically it's suppose to do 3 lines of 8 explosions each.  It alternates from left to right to center.  The left keeps moving farther left, right moves farther right, and the center gets closer to you. 

I just had an idea what might be happening.  I set the repeat delay for the explosion event to 5 but left the other events at 1.  Even though the conditions aren't met I'm thinking it's incrementing the in-sequence 5 times instead of 1.  I'd try it but this PC is doing it's weekly backup and loading FS2 would take forever. 

[attachment deleted by Tolwyn]
« Last Edit: October 09, 2008, 01:43:29 am by FUBAR-BDHR »
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline Shade

  • 211
Re: Multiple explosions using when-argument take 2
That *is* strange. I can't find any obvious fault with your events.
Report FS_Open bugs with Mantis  |  Find the latest FS_Open builds Here  |  Interested in FRED? Check out the Wiki's FRED Portal | Diaspora: Website / Forums
"Oooooooooooooooooooooooooooooooooooooooh ****ing great. 2200 references to entry->index and no idea which is the one that ****ed up" - Karajorma
"We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct." - Niels Bohr
<Cobra|> You play this mission too intelligently.

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Multiple explosions using when-argument take 2
Well I've been messing with this for hours now.  Starting to think it's some kind of bug.  Even just displaying the values of the variables using messages doesn't work.  I should be getting:

1000,0,5000,500
-1000,0,5000,500
0,500,5000,500
2000,0,5000,500
-2000,0,5000,500
0,-500,5000,500
3000,0,5000,500
etc

It's actually returning:
1000,0,5000,500
-1000,0,5000,500
0,0,5000,500
2000,0,5000,500
-2000,0,5000,500
0,0,5000,500
0,0,5000,500
and keeps returning the same 0,0,5000,0 over and over again. 

If I set the repeat to more than 27 (the number in the in-sequence list) it will keep running well after the arguments should have been exhausted.  Starting to think having multiple when-arguments running at the same time is getting confused somewhere.

I updated the link in the first message with the current version of the test mission.
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Multiple explosions using when-argument take 2
It is possible that the code is getting screwed up as you say. The argument system was basically bolted on top of the evaluate_when system and occasionally it does show signs of that.

This may not be a problem with my code so much as another flaw being exposed by my changes but either way it's something I'll look into. Stick it in Mantis and assign it to me. I've been meaning to do a whole bunch of coding but Diaspora launch stuff kept getting in my way the last few days. :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Multiple explosions using when-argument take 2
It's in there.  I don't know how to assign it to you though.

Tomorrow I think I'm going to try putting it all in one event and see what happens.  This was my workaround for when-argument inside of a when not working.  That and I was trying to get it to work in TBP.  Since you fixed that bug I should be able to do it now. 




No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Multiple explosions using when-argument take 2
Okay, grabbed it. Barring any unforeseen complications, I'll take a look at this one tonight as I really want this one working soon. :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Multiple explosions using when-argument take 2
Yeah. Found the cause of this one. Should be pretty easy to fix.

Fixored. The problem was actually with invalidate-argument. Invalidate-argument was actually invalidating the first argument on the list it found, regardless of whether or not it had invalidated it previously. If you notice all the elements in your repeating line have come up before on the argument list. :)

There was a special case with the random-of SEXP but that's fixed too now.
« Last Edit: October 09, 2008, 04:15:55 pm by karajorma »
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

  

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Multiple explosions using when-argument take 2
I was testing the fighter beam problem but grabbed the TBP version of that test mission for it.  Really wasn't paying close attention but it looked like it was working. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras