The Meaning of Life, the Universe, and Everything.
Join Date:
11/14/2014
Posts:
205
Member Details
Hi!
I am working on a really cool and high tech OUTLAST map... this map will contain a night-vision camera. I think I will need some help to put these parts together.
if you take the pumpkin off the item bar will stop decreasing... when you put the camera on agen you the effect timer will be the same as when you left it(I guess that I will have to detect the itembar?).
Decreasing the uses left of an item in your inventory is really difficult.
I thought about a different design, tell me if you like it.
Every time you shoot a bow the player gets a score of, for example, 100.
Each second the score decreases of 1 point.
Only the players with a minimum score of 1 will get the night vision effect while using the pumpkin.
I know that it doesn't use the item bar, but unless there a system that I've never heard of (don't think there is) you'd need to use an awful amount of command blocks and the system wouldn't work nicely at all.
I wil make it so identical to the Game OUTLAST as possible.
I've never played outlast, so I don't know its mechanics.
The only thing that is different in my design is that the time left is shown in the scoreboard and not in the item bar. If you want to use the item bar, you need one command block for each possible damage value, which means 384 command blocks just to give the new item to make it look like it's being used. Another 384 if you want to detect the uses left.
the bar will just show the lifetime so I will only need 14 commandblocks to make the item life bar work... the harder thing is to make it remember how long there is left on the night-vision...
As I said, use a scoreboard objective as the timer itself, so you can give to the player a score equals to the time left. Then you can use the bow to restart the time (=reload) and for displaying the time left.
When the player is using the night vision, his score decreases and when it reaches specific values the bow he has will be replaced with a bow with less uses left.
And I've written four sentences that end with the word left.
sure sounds great with a scorebord timer! what commands then?
If you're constantly giving the player 11 seconds of night vision (which you are if you use MegaDerf's method) then you are much better off using a clock that runs at least 1 time per second, and giving the player only 1 second of night vision when they meet the requirements. Now you no longer have to remove the effect when they don't match, and they will never lose the night vision if they are supposed to have it.
I think the flashing when the effect runs out is something I want to have left (it is something like that in the game too). in the game a battery is 150 sec. I think that just set the effect in 150 sec would work. the problem is more to make the effect start with the same time left ass when you took your pumpkin off.
Now, since you gave 11 seconds of night vision, you need to remove the effect from the people who are not wearing the pumpkin or that don't have any battery point left.
/scoreboard player set @a[score_BatteryTimer=499,score_BatteryTimer_min=499] ChangeBow3 0 [No output]
This is just an example, and you should test it because I'm not 100% sure about it. You need a system like this for each time you want to change the bow. If the player has more than one bow (but no stacked in the same item slot) you need to run this command instead of the second one:
/clear @a[score_BatteryTimer_min=1] minecraft:bow X 1
Do you have points on your BatteryTimer scoreboard?
yes 150 points and it decrease one every sec when I have the pumpkin on me and stop decrease when i take it off... so far it works... but the part with night-vision do not work
can you also give me the commands how to do that in the post before?
Then take out one point from the players that have a score that will give a new bow. For example, if you give a bow with half durability to the player with 200 points (that's a random number, is just an example) you remove a point to all the player that have exactly 200 points. That way the new bows will be given only once. To avoid the durability of the batteries being changed, increase the maximum score of as many points as the number of different stages of bows. For example, if the maximum score was 100 and you have 13 different bow stages, increase the maximum score to 113 and change the number of points at which the new bow is given so it will still be proportional.
Hi!
I am working on a really cool and high tech OUTLAST map... this map will contain a night-vision camera. I think I will need some help to put these parts together.
Battery part:
the camera useing batteries that is a retextured bow. You have to shoot with it to reload (so it will only restart the effect).: http://www.minecraftforum.net/forums/minecraft-discussion/redstone-discussion-and/command-blocks/2446552-detect-use-of-bow
a battery lifetime is 150 sec and you will see it on the item life bar.: http://www.minecraftforum.net/forums/minecraft-discussion/redstone-discussion-and/command-blocks/2445149-item-bar (how do I change the bar of already existing bows?)
Camera part:
when you put the camera(pumpkin) on youre face you will get night-vision in the same time youre battery does.: http://www.minecraftforum.net/forums/minecraft-discussion/redstone-discussion-and/command-blocks/2450644-night-vision-by-pumpkin-head
if you take the pumpkin off the item bar will stop decreasing... when you put the camera on agen you the effect timer will be the same as when you left it(I guess that I will have to detect the itembar?).
poorly explained what I meant? Please tell me!
sry for bad english!
I wil make it so identical to the Game OUTLAST as possible.
the bar will just show the lifetime so I will only need 14 commandblocks to make the item life bar work... the harder thing is to make it remember how long there is left on the night-vision...
sure sounds great with a scorebord timer! what commands then?
If you're constantly giving the player 11 seconds of night vision (which you are if you use MegaDerf's method) then you are much better off using a clock that runs at least 1 time per second, and giving the player only 1 second of night vision when they meet the requirements. Now you no longer have to remove the effect when they don't match, and they will never lose the night vision if they are supposed to have it.
Oh, well then ignore my comment, I've never really played with that effect.
I think the flashing when the effect runs out is something I want to have left (it is something like that in the game too). in the game a battery is 150 sec. I think that just set the effect in 150 sec would work. the problem is more to make the effect start with the same time left ass when you took your pumpkin off.
How should I built it? one of these clock for each commandblock?
looks like some commands is broken... [unknown command] or no output at all?
-COMMANDREPORT-
/scoreboar players set @a[score_UseBow_min=1] BatteryTimer 100 - [just the "d" in "scorebord" (when I fixed it I just get spammd with bows)]
/scoreboard players set @a UseBow 0
The last command must be run last.
Now you need to use the design I gave you on the night vision by pumpkin topic (http://www.minecraftforum.net/forums/minecraft-discussion/redstone-discussion-and/command-blocks/2450644-night-vision-by-pumpkin-head), but you need to use this final command instead of the one I wrote there:
/effect @a[score_pumpkinWORN_min=1,score_BatteryTimer_min=1] minecraft:night_vision 11 - [No output]
The you'd run a clock that would remove 1 point every X time to all the players that are wearing a pumpkin and have a score greater than 0
/scoreboar players remove @a[score_BatteryTimer_min=1,score_pumpkinWORN_min=1] BatteryTimer 1 - [No output]
Now, since you gave 11 seconds of night vision, you need to remove the effect from the people who are not wearing the pumpkin or that don't have any battery point left.
/effect @a[score_pumpkinWORN=0] minecraft:night_vision 0
/effect @a[score_BatteryTimer=0] minecraft:night_vision 0
Now, for the bow part, first of all you need to test at which score you want the bow to lose durability. This is just an example:
/scoreboard player set @a[score_BatteryTimer=500,score_BatteryTimer_min=499] ChangeBow3 1 [No output]
/clear @a[score_BatteryTimer_min=1] minecraft:bow
/give @a[score_BatteryTimer_min=1] minecraft:bow 1 150
/scoreboard player set @a[score_BatteryTimer=499,score_BatteryTimer_min=499] ChangeBow3 0 [No output]
This is just an example, and you should test it because I'm not 100% sure about it. You need a system like this for each time you want to change the bow. If the player has more than one bow (but no stacked in the same item slot) you need to run this command instead of the second one:
/clear @a[score_BatteryTimer_min=1] minecraft:bow X 1
[Command - /effect @a[score_pumpkinWORN_min=1, score_BatteryTimer_min=1] minecraft:night_vision 11
[Output - The entity UUID provided is in an invalid format
[Command - /scoreboard players remove @a[score_BatteryTimer_min=1, score_pumpkinWORN_min=1] BatteryTimer 1
[Output - No objective was found by the name 'score_pumpkinWORN_min=1]'
[Command - /scoreboard players set @a[score_BatteryTimer=500, score_BatteryTimer_min=499] ChangeBow3 1
[Output - No objective was found by the name 'score_BatteryTimer_min=499]'
[Command - /scoreboard players set @a[score_BatteryTimer=499, score_BatteryTimer_min=499] ChangeBow3 0
[Output - No objective was found by the name 'score_BatteryTimer_min=499]'
sry but I do not really understand what you mean... Should I remove the _? or the ]? or what do you mean?
then I cant see any output...
what is hapending is that I got bows spammed in my face
is that right? nothing difrent if a put the pumpkin on me
yes 150 points and it decrease one every sec when I have the pumpkin on me and stop decrease when i take it off... so far it works... but the part with night-vision do not work
can you also give me the commands how to do that in the post before?
the commands?
oh my bad! I forgot to remove a space in the night vision command... but the bow part still do not work.
what does that then?