Author Topic: Simplified Key Hud  (Read 1961 times)

This is the same key hud system I've made for my DeathMatch GameMode.

With this, all default keys are not added to your inventory upon picking them up. Instead, they set a player variable.

When you activate a brick, it will also trigger the key related events. This allows you to open locked doors for example without switching from your gun or whatever. Somewhat like Doom.

(though this will activate onActivate and onKeyMatch/MisMatch at the same time)


If you cannot access my website for whatever reason, please check the mirrors below:
View on Blockland Nexus
View on Blockland Glass
« Last Edit: July 16, 2017, 03:12:18 PM by Crispy_ »

Would be useful for an adventure mode!

Wait, I just made an accidental innuendo.

Does this support the holding of more than one key?
And can this mod be used in conjunction with keycards?

It can support holding any of the default keys, at any amount up to holding all four. You can still use keycards but they will not be using this system, they'll still be items that you have to hold out and use on bricks.

I am considering adding support for a bunch of key mods, so link me to one you really want to work with this and I'll look into getting them to work nicely in this system.

Does the activate event get triggered before the key mismatch/match event?

It parents to Player::ActivateStuff after it's finished doing the key stuff with that function, so it should trigger the onActivate event after the key stuff.

Did a quick edit. If you want something to happen if people dont have the key or any keys at all, just use onKeyMismatch instead of onActivate. Useful if you want to send a message to the player saying "you need a yellow key lol" even if they dont have any keys.

This add-on basically makes onKeyMismatch the same as onActivate, but it does not trigger if the player does have the correct key.
« Last Edit: September 22, 2016, 11:16:14 AM by Crispy_ »