New Horizon on 26/8/2005 at 21:30
Quote Posted by ProjectX
what I meant is that you change the masterkey string on the door to that of the keyring so that every door who's key has been picked up will be openable by the keyring.
Ahhh, okay. I see where you're going with it now. Cool.
New Horizon on 26/8/2005 at 23:38
Hmmm, so once given the lockpicks I can't find a way to make them expire.
I thought another script would work.
On the event that [blslocked]changes on any linked objects [lock]
Action:
Set flag [player can lockpick] to [false] expires on map change [false] expires on map [20]
Haven't tested this yet but will post findings.
Any suggestions welcome.
Krypt on 27/8/2005 at 03:25
You could do the lockpick thing through scripting also if you wanted. I never messed with creating inventory objects very much, so I'm not sure how you could make one that works with this, but here is the quick and dirty way to do it.
So first create a global variable called LockpicksInInventory, or whatever name you want and create a range for it between 1 and 10 (to make 10 be the max carryable). Create an invisible marker somewhere in your map with the following scripts on it:
Script #1 (disallows lockpicking when player has no lockpicks):
CONDITIONS
-When [LockpicksInInventory] becomes [equal to] [0]
ACTIONS
-Set flag [player can lockpick] to [false] expires on map change [false] expires on map [20]
-reset conditions and actions
Script #2 (allows lockpicking when player has at least 1 lockpick):
CONDITIONS
-When [LockpicksInInventory] becomes [greater than or equal to] [1]
ACTIONS
-Set flag [player can lockpick] to [true] expires on map change [false] expires on map [20]
-reset conditions and actions
You'll also probably want a script to set the lockpick flag to true/false when the map starts depending on whether the player starts with any picks, just to make sure it's set right initially. Now on each locked door put this script...
Script #3(checks if you have a lockpick and will subtract a pick from your total as you start lockpicking):
CONDITIONS
-When I am frobbed by player
-Query if [bIsLocked] is [equal to] [TRUE] on any linked object(s) [MYSELF]
-Query if [LockpicksInInventory] is [greater than or equal to] [1]
ACTIONS
Modify [LockpicksInInventory] by [-1]
A couple things to keep in mind is that this will still take the lockpick if you cancel the picking, and it could also take the pick if you frob a locked door that you have a key to. You could handle that on a case by case basis by putting scripts that set a flag PlayerHasCellarDoorKey = true when the player grabs the key, then add a query that PlayerHasCellarDoorKey = false on the above script(make a special one for any door using a key).
Now if you have picks in your map put this script on them...
Script #4(adds 1 to lockpick count when a lockpick is picked up):
CONDITIONS
-When I am frobbed by player
-Query if [LockpicksInInventory] is [less than] [10]
ACTIONS
-Modify [LockpicksInInventory] by [1]
-Delete object [MYSELF]
I think that would work, but it's dirty as I said as I said at the start.
New Horizon on 27/8/2005 at 16:36
Hmmmm, some really cool ideas there. That is definately one way to get around it. Although not quite the original functionality we're looking for.
In the original thief games, lock picks weren't consumables in your inventory, you always had them but they had to be selected before you could use them.
This has promise though because if your scripts can be altered so that when lockpicks are selected from inventory they allow picking and when deselected picking is not allowed, then we'll have exactly what we're looking for...without the need of having to consume lockpicks and place them on the map.
Krypt, were you new to Thief on Deadly Shadows or did you also work on the previous titles? Just curious about what games you have worked on in the past.
Krypt on 27/8/2005 at 21:21
Hmm, well if you just want an object that you use from the inventory then I don't know specifically how to do it. I would just look at one already in gamesys and try copying it, replicating every property and link (you can see links on a gamesys object through an option when right clicking the archetype in the browser, if you didn't know) and then just changing what you need to make your own. I'm not sure if there's a way to track when you equip a specific inventory object through script though. A tricky problem. I specialize in hacking stuff in with scripts, this is outside my area of expertise :p
Nope, I didn't work on any of the older Thief games. I think I was probably about 15 when Thief1 came out, which would be a little young to be getting in the games industry already :cool: I did a bit of QA on the DX PS2 port, then worked on DX:IW for a couple years then T-DS for about the last 10 months of the project.
New Horizon on 27/8/2005 at 22:31
Quote Posted by Krypt
Hmm, well if you just want an object that you use from the inventory then I don't know specifically how to do it. I would just look at one already in gamesys and try copying it, replicating every property and link (you can see links on a gamesys object through an option when right clicking the archetype in the browser, if you didn't know) and then just changing what you need to make your own.
Yeah, kind of lost myself. I tried doing this with lockpicks but I think it must be something to do with how they're coded into the game. They function differently as a powerup, so I'm not sure if we'll be able to find a clean sollution. At this point I'm banging my head into a bloody pulp on the wall.
I've gotten both keys and lockpicks to appear in the inventory as an item but they just refuse to function when selected. There really must just be something I'm missing. :D
Quote:
I'm not sure if there's a way to track when you equip a specific inventory object through script though. A tricky problem. I specialize in hacking stuff in with scripts, this is outside my area of expertise :p
I hear ya. Everything in T3Ed is pretty alien to me. I've only dabbled in Dromed. T3Ed is the first time I've really gotten my hands dirty. I'm finally moving in Doom3 Radiant and I'm really enjoying how intuitive the layout is and it's a lot easier to get a nice workflow going.
Quote:
Nope, I didn't work on any of the older Thief games. I think I was probably about 15 when Thief1 came out, which would be a little young to be getting in the games industry already :cool: I did a bit of QA on the DX PS2 port, then worked on DX:IW for a couple years then T-DS for about the last 10 months of the project.
You're only around 3 years younger than me. Seems like people are getting into it younger and younger these days. :) My friends sister is 16 and we're both applying for the same job in QA for a company here in Canada. Scary, since I'm 30...but that's me, always the late bloomer.
Thanks for the tips in that earlier post. They definately shed some light on the scripting system. You should write up a tutorial on T3Ed script hacking. ;)
Rantako on 29/8/2005 at 16:47
I haven't tried anything for the keyring yet, but I have just got Thief 1/2 style keys working (select them from inventory and frob them on the door). I'm writing the tutorial at the moment, it'll be posted soon. I don't know if anything in it will be useful for this, but it would be worth looking, just in case.
ascottk on 29/8/2005 at 17:00
The closest I've come is adding blsJunk=True on the keys. Once you right click & go back to inventory then they cease to function :erg:
rujuro on 29/8/2005 at 18:12
Rantako, can't wait to hear how you did this. If you got item frobbing to work that is going to open up a lot of doors (no pun intended) for designers.
Rantako on 29/8/2005 at 18:25
Actually, to get the frobbing working, I just used the properties from Project X's inventory readable books (with a few changes, and some new scripts). I had the workings of the key worked out ages ago; I just couldn't get the frobbing to work.