Forum Jump :

Author Message


Posts: 4
Rank:


Level: Member

Country: de
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2012-10-16 15:25        
     
After an operation has been performed, some units in a area should remove from map. Because i dont need them and it costs performance... so how can i do this? I want to use a trigger. All units in that circle should be removed (not killed!).

What I need to do?

Background:

Some US-soldiers went to cherno to free some hostages. After a gunfight all enemies are dead. Then the soldiers should go in the next town. So I no longer need the hostages.


Author Message

Pirin  



Posts: 1547
Rank:


Level: Member

Country: us
Location: Atlanta, GA
Occupation: IT
Age: 45
In-game name: kylania

 
#2 Posted at 2012-10-16 15:55        
     
Just keep track of what you spawn and delete them when you're done.

hostageCleanUp = [];
_hostageman = grpHostages createUnit ["CIV_EuroMan01_EP1", getMarkerPos "hostageLoc", [], 0, "FORM"];
hostageCleanUp = hostageCleanUp + [_hostageman];
_hostagewoman = grpHostages createUnit ["Dr_Annie_Baker_EP1", getMarkerPos "hostageLoc", [], 0, "FORM"];
hostageCleanUp = hostageCleanUp + [_hostagewoman];

Then after the mission:
{deleteVehicle _x} forEach hostageCleanUp;

Or something similar. Better to just make more involved one off missions than complicated and bloaty multiple missions per mission thing. :)


Advertisement


Author Message


Posts: 4
Rank:


Level: Member

Country: de
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2012-10-16 16:07        
     
sorry im a newbie in scripts, where should i integrate it?

i have add two units, the euro man and the dr.


Author Message

Pirin  



Posts: 1547
Rank:


Level: Member

Country: us
Location: Atlanta, GA
Occupation: IT
Age: 45
In-game name: kylania

 
#4 Posted at 2012-10-16 19:21        
     
It depends on how you create the mission. I'm assuming this is sometime like a side objective in some larger scale mission? You could even do something like just have a trigger at base where if the hostages enter the trigger they get deleted and complete the objective.

Can you upload your mission so we can see how you're doing things perhaps? How it's created will give us a better idea of how best to clean up after the mission.