I am building a PW and need help with locks on chests. I want to make the locks bashable without destroying the chests. I also want the locks to reset for other players. How do I do this?
Bashable locks
Débuté par
twcheney
, févr. 07 2011 12:51
#1
Posté 07 février 2011 - 12:51
#2
Posté 07 février 2011 - 04:16
As far as I know, there's no "force lock" mechanism in the game. There may be something you can scavenge off the vault though.
Otherwise, you'd have to script a system yourself to handle that. It's doable but not trivial. Not something that can be easily in a few sentences. I suggest reading up on the scripting system. I think Knightmare has a scripting tutorial for noobs, if you don't know anything about it.
Otherwise, you'd have to script a system yourself to handle that. It's doable but not trivial. Not something that can be easily in a few sentences. I suggest reading up on the scripting system. I think Knightmare has a scripting tutorial for noobs, if you don't know anything about it.
#3
Posté 07 février 2011 - 04:42
You could create a separate lock placeable, associated with a separate chest placeable through a local variable. Then you have some custom on-death and unlock scripts. When the lock is unlocked, it unlocks the chest, same when the lock is destroyed. You can even use SetUseableFlag to toggle the chest from being unusable with an intact lock, to useable once the lock is taken care of.
#4
Posté 07 février 2011 - 05:35
I'm no scripting genius but it seems like using the placeables OnDamaged event would be the way to go for a lock. Couldn't he have the OnDamaged script handle the "lock" using GetTotalDamageDealt and storing it as a variable? Then there would be two ways to unlock the chest, pick it like normal or hit it until the variable hits a certain value. He could then reset the variable in his normal area cleanup script.





Retour en haut






