Select All of one type of object

Select All of one type of object

« posted: Jun 14, 2015, 05:06 PM »
Hi again,

Is there a way to select ALL of one type of object in editor?

For instance, I want to select ALL Striped Barriers I have added to the map. I then want to add a line to the initialization of all the Striped Barriers I have selected. Is this possible?

Any help is greatly appreciated.

Castor
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2488

Re: Select All of one type of object

« Reply #1 posted: Jun 16, 2015, 10:32 PM »
The only way would be to open mission.sqm in a text editor and use regular expressions. Assuming Notepad++, and that you don't already have an init line for stripped barriers, here what to input in the Replace (Ctrl+H) dialog:

Code: [Select]
Find what: ^((\s+)vehicle="Land_CncBarrier_stripes_F";)$
Replace with: \1\r\n\2init="stuffgoeshere";

Then, tick "Wrap around", select "Regular expression", and finally "Replace All".