R Soul on 22/8/2013 at 23:40
Quote Posted by FireMage
This method is to avoid because the AI will be alerted when he will be in the last place where you sheath your weapons. :erg:
Well caught. :thumb:
If the AI is patrolling, NVScript can be used. Give the sword the property
AI > Utility > Watch: Watch link defaults. Copy the data from the screenshot (plus goto object, frob object etc). (Note a correction is needed:
Line requirement should be Line of sight)
Give the sword the NVLinkBuilder script.
Editor > Design Note: NVLinkBuilderLinkType="AIWatchObj"; NVLinkBuilderLinkSource="
ObjectName"; NVLinkBuilderLinkDest="[me]"; NVLinkBuilderOn="InvSelect"; NVLinkBuilderOff="InvDeSelect"
edit:
Also add the script NVInventoryMemory to the starting point. Weapons and items will be remembered when you load a savegame. By default they are forgotten.
FireMage on 25/8/2013 at 22:23
Wow, you're interesting me R Soul! :thumb:
Ok, so tell me, in the facts, what's happening?
The sword is unsheath then it's following you, ok. If an AI see it, it will be alerted.
You sheath it. The sword keep it last position. But thanks to NVScripts it come back to the original starting point instead of staying here and alerting the world...
Is it that?
What is the BuilderLink's Role?
R Soul on 25/8/2013 at 22:53
You mean "NVLinkBuilder". When the sword is drawn, it receives an 'InvSelect' message. NVLinkBuilder is set to be turned on by that message. It adds an AIWatchObj link from the AI to the sword. When the sword is sheathed (or replaced by another weapon) it receives an 'InvDeSelect' message, which turns off NVLinkBuilder, removing the AIWatchObj link.
When the link is created, the data are read from the Watch Link Defaults property.
FireMage on 25/8/2013 at 23:46
And how do you do to make the AI linked to the sword? Is it automatic? I mean, when you select the sword, it will automaticaly create an AIWatchObj Link to all AIs? Or is it a link to create before the beginning that the script will remember later?
R Soul on 25/8/2013 at 23:53
With the parameters in the design note. NVLinkBuilderLinkSource and NVLinkBuilderLinkDest.
FireMage on 26/8/2013 at 10:07
Ha! Ok, thank you! :thumb:
I'll try this, that could be funny! :p