New Horizon on 31/8/2005 at 21:28
I'm having some trouble with this and I'm wondering if it's possible to fix?
In my gamesys, I now have. Keypowerup/ InvKey/ and then *key1, key*..ect.
The key powerup group is setup with a keyring for the hud render.
Now, I can get Key1 and Key2 to stack up in their own Item Slots no problem...but I can't get them to stack in the same slot and add to the same key ring. I'm hoping there is a way around this but so far, no luck.
Any ideas on how to set this up?
By the way, the door locking/ unlocking works beautifully. :)
New Horizon on 1/9/2005 at 00:48
Forget I posted that. I think I may have just figured it out on my walk to the movies.
I'll post when I know it works for certain.
Cheers.
Argh. Disappointment yet again.
So, the problem I had was that if I put Key1 and Key2 in the map under the InvKey archetype...with the Keyring Icon hud render, each key would come up as a separate KeyRing...instead of being added to the same one. So, I thought to myself on the walk to the movies. What if I placed a key in the map, much like we place a door, and then select the properties of that key. Change it to whatever object mesh I wanted and then put a Key1OnKey triggerscript on it. That should work...or so I thought. I copied that key and changed the object mesh and also changed the script to Key2OnKey. I built all, saved and went into the map.
Now when I pick up the keys, they are added to a single KeyRing. Hurray. Yet, they won't trigger either door to unlock. I can pick up only one key, or I can pick up two. Doesn't make a difference.
Anyone know why this wouldn't work? The script is still being assigned to the key. Just in a different way. :( Maybe I don't understand the difference between gamesys trigger scripts and ones placed in the map. I thought it should work since the ones placed on the door work fine.
New Horizon on 1/9/2005 at 01:41
Well, it looks like I'll have to try and find a way to make the previous setup work. Damn. Always an obstacle..unless there is just something I'm missing that is preventing the script from firing. Anyone know if there is a way to get around this?
rujuro on 1/9/2005 at 20:37
Hey quick idea on the lockpicks. This isn't ideal, but what if using the lockpicks gave the player the lockpick upgrade, counted out some kind of a delay, and then removed them again. So the player would frob the door immediately after selecting the picks, but if they don't or if they unlock the door and move on, they would have to select the picks again.
Beleg Cúthalion on 13/5/2013 at 09:09
I have to do a bit of necromancy here unfortunately. I have two locked doors in my FM to which keys exist. One of them works with the inventory key scripts from the tutorial above. Now both doors are at the same time pickable, so the keys are just there for the AIs and experimentation on my end.
Quote Posted by Rantako
InvKey1OnDoorConditions:
Received trigger message [Key1]
Query if linked object(s) [PLAYER] are within [128.00] unreal units from linked object(s) [MYSELF]Actions:
Toggle [bIsLocked] on linked objects of type [MYSELF]
Play sound schema [lock_unlocked] in 2D sound
Reset script conditions and actionsI noticed that since using the keys from the inventory belt only toggles the
bIsLocked property, the door does not open or close. This means you can lock it when it is open and it stays open and is pickable...which is ridiculous. Plus, since one script is used for both locking and unlocking, I cannot add opening and closing of doors to the action list but I have to use two separate scripts instead.
Now here is my problem: I've created two scripts based on the one quoted above. The one for opening a door has a query condition to see if
bIsLocked is true. Then it unlocks the door and opens it, just like in T1/2. It's vice-versa for the closing scripts, it checks for
bIsLocked = false and then locks and closes the door. The closing script works, the opening one not
(or vice versa, cannot remember right now). Everything is cleanly written IMHO, but I can post screenshots only later today or tomorrow. Has anyone of you guys fiddled with this kind of stuff yet?
Oh, and speaking of scripts, at some point I'd like to see Tiens' method of making sitting AIs blackjackable. It never worked for me with stimulus scripts and such.
Edit:
(
http://s1.directupload.net/file/d/3255/3g35k5mj_jpg.htm)
Inline Image:
http://s1.directupload.net/images/130514/temp/3g35k5mj.jpgEdit 2: In a test map with a lock-less door (which cannot be picked), the opening script works but the other doesn't. It's a pity I cannot toggle the opening/closing Actions, otherwise this would be much simpler.
Edit 3: I've tried to transfer the closed-or-not decision to a flag but with no success. The opening script works but the closing one only plays the unlocking sound, as if the game was unable to re-lock a door and close it.
Edit 4 (final one): Whatever it is, I managed to circumvent it by adding a close-all-doors [MYSELF] action to the standard property toggle script above. When the door is locked, it's most probably shut, so a closing-the-door doesn't do anything. If you re-lock it, however, it shuts and you don't end up with an open door that is locked.