Welcome Guest ( Log In / Register ) |
Quick Lists Top RatedTutorials Living World Map G… Ultimate beginner'… Arrow scaling bug… Raising Heroes max… Proper Fire Arrow… Creating an asset.… Simple Structure B… Making a simple Ma… Quick and easy sno… Making patrols nea… Mods The Dwarf Holds The Peloponnesian… RJ - RotWK The Elven Alliance… Helm's Deep Last H… The Elven Alliance Special Extended E… Kings of the West… RC Mod The Wars of Arda Downloads BFME1 1.06 Widescr… Enhanced W3D Impor… Fudge's Map Pack LotR/BfME HD Logos Osgiliath Shellmap Crystals Of Ancien… 2v1 Wold The forests of Dru… Converted BFME2 an… ROTWK animations f… |
|||||||||||||||||||||
Register and log in to move these advertisements down Making patrols near buildings
Before you edit the building you want, you will need to make ChildObjects of the desired patrol. For example, if I want to make a Lorien Archer patrol the Elven Barracks, I will go to elvenlorienarcher.ini, which is located at data\ini\object\goodfaction\units\elven, go to the end of the file, after the last End, and add these lines of code:
//------------------------------------------------------------------------------ ChildObject LorienArcher_B ElvenLorienArcher IsTrainable = No CommandPoints = 0 EquivalentTo = ElvenLorienArcher RadarPriority = UNIT KindOf = PRELOAD CAN_CAST_REFLECTIONS INFANTRY PATH_THROUGH_EACH_OTHER SCORE CAN_BE_REPULSED CommandSet = EmptyCommandSet Body = ActiveBody ModuleTag_02 CheerRadius = EMOTION_CHEER_RADIUS MaxHealth = 100 MaxHealthDamaged = 50 BurningDeathBehavior = Yes BurningDeathFX = FX_InfantryBurningFlame End Behavior = SlavedUpdate ModuleTag_Slave GuardMaxRange = 100 GuardWanderRange = 100 UseSlaverAsControlForEvaObjectSightedEvents = No DieOnMastersDeath = Yes FadeOutRange = 0 FadeTime = 1000 //in msec End End Let's review the code step by step. ChildObject LorienArcher_B ElvenLorienArcher --> This line creates a new unit, that has all of the Lorien Archer traits, and we can change it the way we want KindOf = PRELOAD CAN_CAST_REFLECTIONS INFANTRY PATH_THROUGH_EACH_OTHER SCORE CAN_BE_REPULSED --> This lines set what type of unit the object will be. These KindOfs are my preference, but you can change it to different kindofs of your choosing. Body = ActiveBody ModuleTag_02 CheerRadius = EMOTION_CHEER_RADIUS MaxHealth = 100 MaxHealthDamaged = 50 BurningDeathBehavior = Yes BurningDeathFX = FX_InfantryBurningFlame End --> These lines set the amount of health the patroling unit will have. Behavior = SlavedUpdate ModuleTag_Slave GuardMaxRange = 100 GuardWanderRange = 100 UseSlaverAsControlForEvaObjectSightedEvents = No DieOnMastersDeath = Yes FadeOutRange = 0 FadeTime = 1000 //in msec End --> These lines of code set the unit to be patroling a building, and to what distance they will go DieOnMastersDeath = Yes --> Make the unit die when the Building it guards dies, you can change it to 'No' if you want to disable their death. |
|||||||||||||||||||||
"One site to rule them all, one site to find them, © All Rights Reserved Eric Edwards ©2013. |