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

Reply
 
Thread Tools Display Modes
  #1  
Old 04-30-2012, 11:43 PM
salmo salmo is offline
Approved Member
 
Join Date: Mar 2011
Posts: 632
Default Destroy a mission?

OK, I'm dumb I can't figure out how to destroy/unload an entire mission using the mission number. Here's what I have:

Code:
int i = GamePlay.gpNextMissionNumber();
GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/aus3/misc/my_mission.mis");
sendScreenMessageTo(1, "my_mission loaded", null);
Timeout(5 * 60, () =>      // wait 5 min
{
// destroy my_mission here using mission number i
}
);
__________________
When one engine fails on a two engine bomber, you will always have enough power left to get to the scene of the crash.

Get the latest COD Team Fusion patch info HERE
Reply With Quote
  #2  
Old 05-01-2012, 04:13 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

your Actors get the missionNumber too:
0:
1:
2:
So you must look for the MissionNumber (ActorName) or you create a List or Dictionary and store the actors there with the missionNumber, then you can destroy them easily. Simply add new actors in OnActorCreated to it, and remove it after destroy().
Reply With Quote
  #3  
Old 05-01-2012, 04:26 AM
Smokeynz Smokeynz is offline
Approved Member
 
Join Date: Apr 2011
Posts: 106
Default

public virtual void OnMissionLoaded(int missionNumber)

There is also the above available, which may allow you then to list the mission number and mission name.

noting each time the same mission name is loaded it gets a new sequence mission load number so you need to know both.

However as Kodiak notes only the ai or objects loaded within the mission need killing off. You may be able to reference all objects or ai associated with the load mission number and destroy all.
Reply With Quote
  #4  
Old 05-01-2012, 05:33 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

you can't destroy static object at the moment, you get no handle to it.
Reply With Quote
  #5  
Old 05-01-2012, 08:55 AM
salmo salmo is offline
Approved Member
 
Join Date: Mar 2011
Posts: 632
Default

Quote:
Originally Posted by FG28_Kodiak View Post
you can't destroy static object at the moment, you get no handle to it.
Thought so. My purpose in trying to 'destroy' the entire mission was to rid the battle of some selected statics Destroying Ai's & ground objects I can do.
__________________
When one engine fails on a two engine bomber, you will always have enough power left to get to the scene of the crash.

Get the latest COD Team Fusion patch info HERE
Reply With Quote
  #6  
Old 05-01-2012, 09:11 AM
5./JG27.Farber 5./JG27.Farber is offline
Approved Member
 
Join Date: Aug 2011
Posts: 1,958
Default

Why just load a different blank map then the next mission? This will wipe it all??
Reply With Quote
Reply


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 03:23 PM.


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