====== Using InvCarryOver & InvLoadUp (tnhScript) ====== These short tutorials explain how two missions need to be set up so objects in containers and in the player inventory can be carried over between them. You need Telliamed's tnhScript for these to work. ===== How to carry over the content of a container from one mission to the next ===== == First mission: == 1. Create a container. 2. Add the $$Scripts$$ property to the container. You can delete $$LockSounds$$ and $$Container$$ here and type $$InvCarryOver$$ into the first field instead. Make sure $$Don't Inherit$$ is @@not@@ checked. 3. Create $$Contains$$ links from the container to any object that should be found inside. Additionally, create $$ScriptParams$$ links from the container to each object and type $$CarryOver$$ into the Link Data field. == Second mission: == 1. Repeat steps 1 and 2 from the first mission, but add the script $$InvLoadUp$$ instead of $$InvCarryOver$$. That's it! At the end of the mission, the content of the container will be saved and restored in the next mission. :!: Note about contained objects: Any properties you've added to a concrete object are not carried over, with the exception of $$Stack Count$$. If you need additional properties on a object to be carried over, create an archetype for the object and add the properties there. Don't forget to save the gamesys in this case. ===== How to carry over the player's inventory from one mission to the next ===== == First mission: == 1. Add the $$InvCarryOver$$ script to the starting point. 2. Add $$ScriptParams$$ links from the starting point to each inventory item with $$CarryOver$$ as the Link Data. If certain items aren't in the player's possession at the start but can be found during the mission, you can either add the $$ScriptParams$$ links to the concrete objects or to the archetype instead. For stackable equipment like water arrows etc. it's easier to link to the archetype. 3. Add $$Editor->Design Note$$ to the starting point and type ''inv_player=1''. == Second mission: == 1. Add the $$InvLoadUp$$ script to the starting point. 2. Add $$Editor->Design Note$$ to the starting point and type ''inv_player=1''.