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 Combo Hordes
Recruitable Combo Hordes. Before I go into what we need to change, let's first have a look at what we did on the last page. The HordeContain module currently looks like this:
These lines cause the big problem:
The first 2 lines tell that when this horde is created, it contains 15 GondorFighters, and 15 GondorArchers. But the barracks can only create one type of unit per horde. The 3rd line tells that the horde can contain a maximum of 30 units, exclusive banner carrier. However, when the horde is created, they always create the maximum number of units possible. If we say that they should create 15 fighters, and that the horde can contain 30 units, they'll just create 30 fighters. We don't want that. However, when we create the horde in any other way, everything will work fine. To do this, we'll use the ObjectCreationList. We'll recruit another object, that immediately dies, but when it dies, it spawns our horde. First we'll create this object. It's a very basic object, and we'll create it in goodfactionsubobjects.ini. If you scroll down, you'll find more of these "eggs". Our object code looks like this:
Basically it has no model, it can't move or be attacked, and it dies immediately. When it dies, it is destroyed after 4 seconds, and triggers the "OCL_SpawnGondorFighterArcherComboHorde". Note that you have to define the build cost and time here, as this is the object we'll recruit from the barracks. Also add the commandpoints here, or the horde won't stop building when you've reached your commandpointlimit. Now we need to define this OCL, therefore we'll go to objectcreationlist.ini (just after the object folder). We'll create the following objectcreationlist:
This ObjectCreationList spawns our horde, that fades in in 2 seconds. It has an offset to create it outside our barracks. Now we just have to create a commandbutton and alter the commandset for our barracks: commandbutton.ini:
commandset.ini:
Now our barracks can produce combo hordes! But the AI doesn't use them. On the next page, we will solve this final problem. Links / Downloads
CommentsDisplay order: Newest first Sulherokhh (Team Chamber Member) - Monday May 4, 2009 - 15:28 That's normal when combining. Think of it as guards for the archers. What is actually causing this is that a single horde (even a combo horde) can only have a single rangefinder active. The rangefinder triggers the weapon. In this case the rangefinder has approximately the same range as that of the archers themselves and therefor they fire. Any targets are acquired by the fighters, but their melee weapons simply don't have enough range for an actual attack to occur. And the horde will not seperate for it to happen. If you shorten the range of the rangefinder, even the archers will close to melee range. drogoth232 - Monday May 4, 2009 - 14:18 Really good Tut. But I have a problem. Only my archers atttack and my fighters just stay there until a unit gets close enough for them to attack. MrFurious - Wednesday April 29, 2009 - 1:48 I've deleted the whole code page, as it was full of errors, because it was the code I used for testing, not for creating this tutorial. Maybe I'll have another look at the whole tutorial, and make some additions, or recreate the code page with the right code. Sulherokhh (Team Chamber Member) - Wednesday April 29, 2009 - 1:23 Your tut could use some reformatting, especially in the code sections, to make it more readable. There is one more 'end' than needed in the 'commandset.ini'-section on page 4. MrFurious - Friday April 24, 2009 - 9:58 I found a new, easier way to recruit the horde, so I've updated the guide accordingly. |
|||||||||||||||||||||||||||||||||||||||
"One site to rule them all, one site to find them, © All Rights Reserved Eric Edwards ©2013. |