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 Eowyn Disguise/Camouflage (Scripts)
All the ModelCondition stuff for scripting: First we give Eowyn a ScriptFuncion. Go back inside her Object-Code and look for this:
Now we add a line, so it looks like this:
The new 'RohanEowynFunctions' will be defined in 'scriptevents.xml', which is were we will go now! :-) We need the following two files: data\scripts\scriptevents.xml data\scripts\scripts.lua Open the first one. At the head you will find:
Then follows a list of 'Events', condition definitions that can be used as a trigger for a scripted action. Right after that follows a list of internal events, describing very specific situations. Here are the first 3:
Next section is the scripted events:
I guess you can imagine what they are used for, right? :-) What now follows it the really interesting part, the 'modelcondition events'! Here are the first 3 so you have an example:
This is where we can custom define certain ModelConditions as a trigger for stuff to happen! And that's what we will do now. The following needs to be inserted somewhere just before between or after all other ModelCondtionEvents:
The PLUS and MINUS before the ModelCondition signifies the 'presence' or 'absence' of the ModelCondtion, which can be combined with other ModelConditions like in the first three examples. But these simple ones will do the job. NOTE: The whole Event-List starts with this:
... It closes right after the last ModelConditonEvent-Line with this:
This is basicall the Begin/End block for the Events. Make sure any further custom Events are located in between those two lines. What now follows are the Event-Lists. These are loaded by objects that need them and it loads a list of the abovementioned triggers and a reference for the file 'scripts.lua' so that it knows WHAT to trigger. I won't give anymore examples here, just our new list, RohanEowynFunctions.
Just put it somewhere among the other EventLists. If you look closely, you see that the list contains 'OnCreated', an Event who's condition is fullfilled by building Eowyn, PLUS the custom items we have implemented just before this. Every single Event will trigger a different script function. Those are described in the file 'scripts.lua' where we will go now. If you could follow so far, well done! :-) The file 'scripts.lua' contains functions that are mostly used upon the Event 'OnCreated' to PreHide certain subobjects, like 'flaming arrows etc.' that are only shown when something ingame happens. Also all the panic reactions and other emotional behavior has some functions listed here. This way you make the Troll rampage, the burning Mûmak run amok, etc. The new functions for Eowyn just do something straight forward. They provide all the upgrades needed for the Disguise and Invisibility to work. Just insert the following new functions somewhere among the list. The end of the file would be suitable:
The first one 'OnRohanEowynCreated_SEE' removes the Upgrade that signifies that she currently uses disguise. This is important as she could die while disguised. Now when she is created (and not disguised), the upgrade will be removed. Functions 2 and 3 are granting and removing the just mentioned upgrade depending on if she currently has the ModelCondtion DISGUISED, which will be set by the 'SpecialDisguiseUpdate' in Eowyn's Object Code and removed if it ends. Remember, the Upgrade triggers the AuraUpdate of the Rohirrim, so that they can provide Eowyn with the ModelCondition USER_1 once she is in range. Functions 4 and 5 are Eowyn reactions to gaining and losing ModelCondition USER_1. When she gains it, she will also gain all she needs to trigger her 'InvisibilityUpdate'. When she loses USER_1, the 'InvisibilityUpdate' goes inert again. That's it for now! Have fun with beautiful Eowyn, hehe. :-) Sûlherokhh. Credits
CommentsDisplay order: Newest first Mouth of Sauron - Thursday January 14, 2010 - 5:49 Thank you, this is most useful generally ; about Eowyn however... I never understood this ability and I cannot see for what should it be used - she was not hiding before the ennemy, she was hiding before Theoden, wasn't she... |
|||||||||||||||||||||||||||||||||||||||||||||
"One site to rule them all, one site to find them, © All Rights Reserved Eric Edwards ©2013. |