I've been looking through the rules and found the Ready Action confusing. According to the PHB pg.194 it states that the ready action can be done using a reaction, setting up a trigger, and proceeding with that readied action if the trigger is to occur (Or ignore it). It also gives rules on how a player can use the ready action to cast a spell.
Now my confusion is what the ready action uses. According to Jeremy Crawford, he stated that the ready action can be used to attack. Understanding that the ready action uses your reaction to set up a trigger. This would mean you can attack or cast a spell off your turn using this action.
As an example let's say on a player's turn they decide to attack using a longsword on their turn, afterwords they switch their sword for a bow using a free object interaction before stating "I use my reaction to use the ready action, when a creature near the door enters through I will fire a shot." Therefore using a ready action with his reaction to shoot his bow. An action that would likely happen off his turn.
With this logic would this mean that a creature who were to cast booming blade on their turn with an action could also use their reaction to cast and hold that spell until the trigger happens? In this example, the trigger was to wait for a creature to pop out of the corner.
Even though this would basically be the same as the warcaster feat which reads as follows
When a hostile creature's movement provokes an opportunity attack from you, you can use your reaction to cast a spell at the creature, rather than making an opportunity attack. The spell must have a casting time of 1 action and must target only that creature.
Because of this I wonder if a player uses the ready action it consumes their reaction. But if they state the trigger of their ready action is to attack or ready a spell does it use that the action required with the cost of the reaction or not at all as it uses the reaction?