How to make a Pulse only activate on the second time activated?

I've hit a problem while making a map. I want one command block to activate on the the first pulse but another when I hit the button a second time.
If there are any Redstone pros out here then could you please help me with this challenging feat.
Best Answer
Okay, this is my attempt at answering this question:
[Command1 in Command Block], Redstone repeater, Command block with command: /setblock ~2 ~ ~ command_block 0 replace {Command:"Command2"}
These need to be placed along the x axis of the map with the second command block 2 blocks in a positive direction ahead of the first. (Use F3
to check direction, look at pointing-at
co-ords)
I hope this fits your needs.
Pictures about "How to make a Pulse only activate on the second time activated?"



SIMPLE pulse extenders for Minecraft 1.19
More answers regarding how to make a Pulse only activate on the second time activated?
Answer 2
Trigger a t-flipflop to toggle which command block to activate
C
t
rRBrPO rC
BBPBBBBBB
B is solid block r is redstone dust R is repeater P is piston c is command block t is redstone torch O is redstone block
the lower piston is facing up, the upper piston is facing right and is sticky.
The left piston creates a 1 tick pulse, the right sticky piston is a t-flip flop. When the lower command block is activated, the torch will turn off and when the t-flip-flop is triggered again the lower command block will de-activate and the torch will turn on activating the top piston.
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Anete Lusina, Mike, Tatiana Syrikova, Tatiana Syrikova