This is what I've come up with as a script for a hero-based map setup.
*** IF *** Player '<This Player>' has Greater Than 0 unit or structure of type 'ElvenPorter' *** THEN *** Find 'ElvenPorter' Owned by Player '<This Player>' nearest team Team 'PlyrCivilian/teamPlyrCivilian' and reference as UnitRef 'PorterForDeletion' Unit 'PorterForDeletion' is removed from the world. Show debug string and pause: String: 'AI_DEL_PORTERS' *** ELSE *** Disable Script 'Destroy Porters - Elves'.
For anyone who needs a custom map where you're going to disable the annoying little porters that come hardcoded to bfme2. If you want to disable building more, you can disable each type of porter, and worker in a script as well. You probably also need to make this script for each type of porter. (I just disabled factions for each player on the map)
Don
have a great day
Edited by Gumby22don, 21 March 2006 - 05:17 AM.