Quote Posted by Krypt
Quote Posted by New Horizon
I attached this script to the holywater flask in gamesys.
Condition:When I am used in any way from the inventory.
Action:Send Trigger Message [holywater used]
Reset Scripts and Actions.
This script is fine, I don't think it would require any changes
Quote Posted by New Horizon
I attached these scripts to the water arrow in gamesys.
----------------------------------------------------------------------
Scripts On Water Arrow
Condition:Received Trigger [HolyWaterUsed]
When [WaterArrow] count in inventory becomes [equal to] 0
Action:Add [0] [HolyWaterArrow] Objects to the player inventory
Delete [0] [WaterArrow] Objects from the player inventory
Reset Script Conditions and actions.
Ok, the problem with these scripts are the conditions. They have two "When" conditions paired together, which will never really work how you want because the conditions have to happen at the exact same time. The scripts were looking for the number of Water arrows in your inventory to be changed to 0/1/2/3 at the same time the trigger message is received. What you would want is a Query, but I don't think there is a Query condition for inventory items, so you'd have to hack a way around it. Here is how I would set it up:
First, make a global int for how many water arrows the player has. I named it "WaterArrowsInInventory". Set the range from 0 to 3. Second, you'll need 4 scripts to set the global int to the appropriate number at specific times. You might not want to put these on the water arrow, because it might fire 20 times if you have 20 water arrows or something. Put it on something that will always be there and there will only ever be one of. If you can, I'd say put them on PlayerGarrett in gamesys.
Quote:
Condition:When [WaterArrow] count in inventory becomes [equal to] [2]
Action:Set [WaterArrowsInInventory] to [2]
Reset Script Conditions and actions.
Copy this script twice and replace the 2's with 1's and 0's.
Quote:
Condition:When [WaterArrow] count in inventory becomes [greater than or equal to] [3]
Action:Set [WaterArrowsInInventory] to [3]
Reset Script Conditions and actions.
We can leave the variable at 3 if the actual count is higher than 3, because we don't need to check any higher than that.
Those scripts will now allow us to query the number of water arrows in the player's inventory. Now for the script that checks how many water arrows you have and converts them to holy water arrows:
Quote:
Condition:Received Trigger [HolyWaterUsed]
Query if [WaterArrowsInInventory] is [equal to] [3]
Action:Add [3] [HolyWaterArrow] Objects to the player inventory
Delete [3] [WaterArrow] objects from the player inventory
Reset Script Conditions and actions.
Copy this script twice and replace the 3's with 2's and 1's. If you have 0 water arrows then none of these scripts will fire and nothing will happen, so we don't need a special script for that. Also put these scripts on PlayerGarrett, if you can.
I think that should work now. I didn't actually try it myself, so I may have missed something. Let me know whether it works or not, and feel free to ask if you need any clarification on any of the stuff above. Good luck with all your future T3 editing endeavors! :D