1

Minecraft Adventure Map Help

phomper's Avatar phomper10/26/16 10:11 pm
1 emeralds 696 3
11/21/2016 4:44 am
Pepijn's Avatar Pepijn
I am currently making a Minecraft Apocalyptic Adventure Map where the air is toxic and you must wear a gasmask, and I was just wondering how I would make it work.

I need to have a command that when you take off your gasmask, you start to take damage, and when you have it on, you don't. Also, there are some bunkers and places with breathable air, which you will be able to remove it freely.

I have played some space adventure maps where this happens, so I know it's possible, but I have no idea what command/s I would need to use.

Can somebody help me?

Also, I'm making custom shops in it, and I know how to make it take something from your inventory and give you the item, but I DON'T know how to make it NOT give it to yu if you don't have enough.

Help, please?
Posted by phomper's Avatar
phomper
Level 17 : Journeyman Crafter
0

Create an account or sign in to comment.

3

Pepijn
11/21/2016 4:44 am
Level 57 : Grandmaster Cyborg
Pepijn's Avatar
On a commandblock clock:


scoreboard players tag @a[tag=mask] remove mask

scoreboard players tag @a[tag=!mask] add mask {Inventory:[{id:minecraft:iron_helmet,Slot:103b,tag:{display:{Name:Gas Mask}}}]}

effect @a[tag=!mask] minecraft:wither 1 0


This will give every player who isn't wearing an iron helmet with the name "Gas Mask" the wither effect (if you don't know how to /give items with a custom name, just ask). You can of course change the item and the name to your liking. Advantage of this method over the one mentioned before is that it works properly with multiple people.

Which method you use is up to you, but keep in mind that the wither effect can kill people while the poison effect can not.
1
RetroGamingHD
11/12/2016 1:27 am
Level 1 : New Miner
RetroGamingHD's Avatar
If your advanced enough, and you could testfor the player in a certain area, than that could activate this /testfor @p {Inventory:[{Slot:103b,id:"minecraft:IDNAME",tag:{display:{Name:"CUSTOMITEMNAME"}}}]}
But take out the orange, this will look for a player with the helmet on, once its off you could use a redstone torch activating a repeating command block giving poison for 1 second (It will be on repeat until the torch is off)
1
Greystalk
10/27/2016 12:57 am
Level 45 : Master Ranger
Greystalk's Avatar
I could try to explain all of this, but it would be a very long post. I can give you this link which has some awesome command block tutorials, and feel free to PM me if you still need help.

http://jragoncommands.weebly.com/tutorials.html
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome