Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   FMB, Mission & Campaign builder Discussions (http://forum.fulqrumpublishing.com/forumdisplay.php?f=203)
-   -   Destroy a mission? (http://forum.fulqrumpublishing.com/showthread.php?t=31657)

salmo 04-30-2012 11:43 PM

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
}
);


FG28_Kodiak 05-01-2012 04:13 AM

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().

Smokeynz 05-01-2012 04:26 AM

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.

FG28_Kodiak 05-01-2012 05:33 AM

you can't destroy static object at the moment, you get no handle to it.

salmo 05-01-2012 08:55 AM

Quote:

Originally Posted by FG28_Kodiak (Post 417667)
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.

5./JG27.Farber 05-01-2012 09:11 AM

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


All times are GMT. The time now is 07:30 AM.

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