Next up...holy water arrows. - by New Horizon
New Horizon on 17/9/2005 at 13:28
Quote Posted by Crispy
Yeah, that's true, and the timeout did give more tension than a count would. If you know you have 3 holy water arrows, you can use them at your leisure, walk around to find the zombies you want to take out, and take time aiming. If you're allowed to let off however many you can manage in 30 seconds, time becomes crucial - you have to rush, taking less time to aim and possibly missing as a result. On the flip side, you can fire off 10 holy arrows in one go if you need to - assuming you're skilled enough!
NH - It sounds like "Received Trigger" is a When-type condition, which might be causing problems as you're not suppose to have two Whens in one script. Try deleting the second When condition, so you end up with:
Received Trigger [HolyWaterUsed]
Query if [MaxInventoryStack] is equal to 0 on any linked objects [Myself]
... and so on.
Yeah, I've already tried that. Wouldn't work. :( It solves the problem of all the scripts firing at once and only gives 3 holy water arrows but when I get down to 2 or 1 arrows, it still swaps in three holy water arrows...completely ignoring my other scripts. Shouldn't telling the engine to Query if maxinventory on the linked object is greater than equal to 3, and then equal to 2 or 1 make it obvious when to fire the scripts? Maybe I'm just confused about how it all works.
This is how I had it setup when I was using your suggestion.
Scripts On Water ArrowCondition:Received Trigger [HolyWaterUsed]
When [WaterArrow] count in inventory becomes [equal to] 0
Query if [MaxInventoryStack] is equal to 0 on any linked objects [Myself]
Action:Add [0] [HolyWaterArrow] Objects to the player inventory
Delete [0] [WaterArrow] Objects from the player inventory
Reset Script Conditions and actions.
-----------------------------------------------------------------------
Condition:Received Trigger [HolyWaterUsed]
When [WaterArrow] count in inventory becomes [equal to] 1
Query if [MaxInventoryStack] is equal to 1 on any linked objects [Myself]
Action:Add [1] [HolyWaterArrow] Objects to the player inventory
Delete [1] [WaterArrow] Objects from the player inventory
Reset Script Conditions and actions.
------------------------------------------------------------------------
Condition:Received Trigger [HolyWaterUsed]
When [WaterArrow] count in inventory becomes [equal to] 2
Query if [MaxInventoryStack] is equal to 2 on any linked objects [Myself]
Action:Add [2] [HolyWaterArrow] Objects to the player inventory
Delete [2] [WaterArrow] Objects from the player inventory
Reset Script Conditions and actions.
-------------------------------------------------------------------------
Condition:
Received Trigger [HolyWaterUsed]
When [WaterArrow] count in inventory becomes [greater than equal to] 3
Query if [MaxInventoryStack] is [greater than equal to] 3 on any linked objects [Myself]
Action:
Add [3] [HolyWaterArrow] Objects to the player inventory
Delete [3] [WaterArrow] Objects from the player inventory
Reset Script Conditions and actions.
-------------------------------------------------------------------------The script to add 3 holy water arrows seems to be the only one being noticed. Not sure why it's ignoring the great than or equal to statements.
Rantako on 17/9/2005 at 15:07
Quote:
The script to add 3 holy water arrows seems to be the only one being noticed. Not sure why it's ignoring the great than or equal to statements.
The problem is the MaxInventoryStack property. This property is set in the gamesys, and specifies the maximum number of that item you can carry at once. On water arrows, it's 25. So it is
always greater than or equal to 3, no matter how many water arrows you use. So the last script is the only one that's firing.
New Horizon on 17/9/2005 at 16:39
Doh! Like I said...I'm really not so hot at figuring this stuff out. :)
New Horizon on 17/9/2005 at 17:31
GAH!!! Trying to do what should be the easiest of tasks in this editor is such a chore. I've absolutely had it, I give up.
I try one thing...only the 3 holywater arrows show up...I try another and they all fire at the same time. It literally makes me want to delete t3ed and all my work and just forget about it. I've spent three days mucking around something that shouldn't have taken more than ten minutes to set up.
SubJeff on 17/9/2005 at 18:47
The arrow gods have spoken. Thou shalt possess 3 holy water arrows and no more. Thou shalt not possess 2 unless thou are in preparation to take up another and thus move on to possesion of 3. Thou shalt not possess 1 unless... :p
GlasWolf on 17/9/2005 at 20:36
NH, didn't you already give up about a month ago... something about keys and inventory items? Two weeks later, we have a beta FM with working keys, due in no small part to you. Come on, you're doing a grand job! :cool:
New Horizon on 17/9/2005 at 21:35
Quote Posted by GlasWolf
NH, didn't you already give up about a month ago... something about keys and inventory items? Two weeks later, we have a beta FM with working keys, due in no small part to you. Come on, you're doing a grand job! :cool:
What can I say...I'm a diva. LOL This is really testing my limits though, I'm just so tired of wrestling with it and having gotten soooooo close. I'll try to get hold of Krypt and see what he thinks.
rujuro on 17/9/2005 at 22:27
Well, there is a condition tha says:
when [InventoryClass] count in inventory becomes [relation] [int]
You could use this to set flags that let the other scripts know how many water arrows are available.
Ex:
Flags:
Has3orMore
Has2
Has1
Script:
When [WaterArrows] count in inventory becomes [>=][3]
Set [Has3orMore] to [true] blah blah blah.
Then when used:
Query if [Has3orMore] equals [true].
etc.
Only problem is I see is that you'd have to set an initial flag state that assumes the player has a certain number of arrows since I didn't see a query with the same functionality.
New Horizon on 18/9/2005 at 02:11
Problem solved. The system works perfectly now. :) Full credit goes to Krypt for taking the time to figure out where I was going wrong and then PM'ing exactly what I needed to do.
The answer to our problems was the global int's. I really didn't know much about them so I didn't really get how they worked. I'm going to get my head around them if possible. For now though, we have a working holywater arrow system for the new T3Ed installer. A single flask douses 3 water arrows and puts them in a separate inventory slot, you can use them at your leisure as they won't expire...but you still lose 3 regular water arrows.
I think it's a nice balance between the original games, Inverted Manse and T3. :) Thanks to all who helped and three cheers for Krypt. I suggest we all pool some money together and commission him to write up a Trigger Script Manual. What do you all say? ;)
ascottk on 18/9/2005 at 03:12
Quote Posted by New Horizon
Problem solved. The system works perfectly now. :) Full credit goes to Krypt for taking the time to figure out where I was going wrong and then PM'ing exactly what I needed to do.
The answer to our problems was the global int's. I really didn't know much about them so I didn't really get how they worked. I'm going to get my head around them if possible. For now though, we have a working holywater arrow system for the new T3Ed installer. A single flask douses 3 water arrows and puts them in a separate inventory slot, you can use them at your leisure as they won't expire...but you still lose 3 regular water arrows.
I think it's a nice balance between the original games, Inverted Manse and T3. :) Thanks to all who helped and three cheers for Krypt. I suggest we all pool some money together and commission him to write up a Trigger Script Manual. What do you all say? ;)
And you were about to give up . . . \o/ \o/ \o/ I should bring up flares . . . .