Aller au contenu

Photo

Bashable locks


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
twcheney

twcheney
  • Members
  • 36 messages
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?

#2
c i p h e r

c i p h e r
  • Members
  • 261 messages
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.

#3
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
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
Mad.Hatter

Mad.Hatter
  • Members
  • 165 messages
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.