Are you able to testfor people somewhere on a countdown?

Are you able to testfor people somewhere on a countdown? - Unrecognizable young bearded ethnic craftsman pointing with paintbrush at camera sitting at table in modern creative workshop

For a part of my Vanilla world I would like to test for a player on a block. Then I would like to test for a player standing on another block within a certain duration of time(Like 4 seconds) from when the first testfor was activated.

I'm using 1.9 commands. Is it possible with the available commands at the time?



Best Answer

I will call "A" the first block you have to stand onto, and "B" the second.

/execute @a ~ ~ ~ detect ~ ~-1 ~ A -1 /scoreboard players set @p Timer 80

/scoreboard players remove @a[score_Timer_min=1] Timer 1

/execute @a[score_Timer_min=1] ~ ~ ~ detect ~ ~-1 ~ B -1 commandyouwanttoexecute



Pictures about "Are you able to testfor people somewhere on a countdown?"

Are you able to testfor people somewhere on a countdown? - I Hate Nothing About You With Red Heart Light
Are you able to testfor people somewhere on a countdown? - Yellow stethoscope composed with red hearts on white background with thank you doctors and nurses text and medical mask
Are you able to testfor people somewhere on a countdown? - Brown Envelope With Thank You-printed Card



Do command blocks have a range?

Range 2 is the range a player want for a command block under a floor. Keep in mind that it will produce a globe shaped trigger area (rather than a cube), so a range of 2 makes an approximately 5\xd75\xd75 area and a range of 1 makes a 3\xd73\xd73 area (more like a + pattern with an extra block above and below the center).






More answers regarding are you able to testfor people somewhere on a countdown?

Answer 2

1) Arrange redstone in the same logical order as on this screenshot:

Minecraft Redstone Example

1.1) All Reapeters DIRECTLY next to a stone block (not the one at the piston) are set to 4 ticks, all the others to 1 tick, the most-down Reapeters are forming a clock.

2) Into the "lower" command block put your first command, into the second place the "after four seconds" command. The delay is set to 4 seconds, but the real delay will be like 4.2-4.4 seconds.

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Andrea Piacquadio, Designecologist, Karolina Grabowska, Panos Sakalakis