Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 12-18-2011, 08:29 AM
41Sqn_Banks 41Sqn_Banks is offline
Approved Member
 
Join Date: Oct 2007
Posts: 644
Default

Quote:
Originally Posted by 41Sqn_Banks View Post
Oh wait I had an idea:

If I destroyed the Aircraft this should change the content of the getItems() array. This will confuse the foreach loop and it will skip some aircraft.
Obviously the aircrafts are destroyed with a small delay, that's why it is working for some aircraft and some not.

Solution: Store the aircraft to destroy in a seperate list first. Then loop over this list and destroy the aircrafts in it. This way even if the content of getItems() is changed, the content of the list stays the same

I'll check this and report back.
This was the solution. I updated the code in the first post. I think this topic is something for Ataros scripting collection
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:50 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.