This is how the scene for The Gremli9n and Pacer knocking Thomas out and Queen Chrysalis' plan for revenge is realveled in Thomas and Twilight Spalkle's Adventure with Spy Kids.
[the engines, agents, and ponies then hit a fork in the hall]
1206: Oh great, just what we need. A 3-way junction!
Rattlesnake Jake: Now what are we gonna do?
Steamy: Let's search fer' somethang' that can lead us ta' Twi and Cadance.
[everyone starts searching]
Mucker: [using his Microscope-telescope] Nothing yet.
[A secret door opens and the Gremlin and Pacer grab Thomas]
Thomas: Hey! What are you doing?
Gremlin: Shut it!
[the Gremlin and Pacer put Thomas into a box. Then knockout gas is turned on and Thomas gets knocked out]
[back with everyone else, James and Percy find something]
Percy: Tire tracks!
Toby: That must be the way to Twi and Cadance!
Emily: That's good.
Sharky: Hey Thomas! Did you find anything? Thomas? [looks back] Holy White Squall! He's... He's gone!
Sir Handel: He's gone? What do you mean he's gone?!
Willy: I don't know. One minute he was here... the next, he disappeared!
Dusty: [sees something on the ground] Look! A Pacer part!
Steam Mech: [picks up the part] That damn Gremlin and Pacer snatched Thomas!
Bash: How do they..
Dash: do that, with out being...
Ferdinand: That's right.
Daring Do: Maybe they took him down the hall!
Puffy: Good thinkin' Darin'. Come on!
[the engines, agents, and ponies race down the hall]
With Thomas, Gremlin and Pacer.
Thomas: [wakes up] HUH?
Gremlin: Good, you're up.
Pacer: And just in time.
Thomas: You! What have you done with Twilight and Cadance?!
Gremlin: They're in their prison cell down hall D.
Thomas: They're okay?
Pacer: Not for much longer!
Pacer: Well Thomas, it was all part of the plan. Queen Chrysalis wanted revenge on Shining Armor and she's gonna get it by killin' the 2 most important things ta him; his sister and wife.
Gremlin: We put a bomb near their prison cell.
Thomas: GASP! A bomb?!
Pacer: Yeah, in a few minutes, they will be teleported to the big castle in the sky! And revenge on Shining Armor will be a success!
Gremlin: Don't feel bad Thomas, you couldn't of saved your girlfriend.
Pacer: Oh, wait! You could have!
Thomas: You dumb Lemons!
Gremlin: What, you though the Changling Queen would keep Twilight Sparkle and Mi Amore Cadenza alive in their cell forever? [guffaws]
Pacer: That's right. They're gonna die!
Gremlin: Nice talkin' with ya Thomas. We'll tell your girlfriend you said "goodbye".
[both laugh as they leave]
Thomas: [on radio] Finn, come in! Do you read?
Finn McMissile: [on radio] Yes, I read you Thomas. Where are you?
Thomas: [on radio] I'm in hall D! The Gremlin and Pacer brought me here!
[with the others]
Holley Shiftwell: [looks on her computer] I have Thomas dectected.
Thomas: [on radio] The Gremlin and Pacer also told me Queen Chrysalis' plan. They put a bomb near Cadance and Twilight's prison cell. And in a few minutes, they'll be blown to smithereens!
Twi's Friends: WHAT?!
Apple Bloom and Scootaloo: WHAT?!
Sweetie Belle: WHAT?!
Shining Armor: No!
Finn McMissile: [on radio] Thomas! You've got to go and get Twi and Cadance out!
Thomas: [on radio] What about you guys? I have to let you catch up!
General Dedrich: [on radio] There's no time Thom! You don't go now, you won't be able to save Twilight Sparkle and Cadance at all!
Shining Armor: Please Thomas! Do it for Twily! Do it for Cadance! Do it for your honorary brother!
Thomas: [on radio] Okay! I'll meet you there! [takes off]
Shining Armor: Oh man, this is just like my wedding all over again! but even worst!
General Dedrich: Captain, what are you talking about?
Shining Armor: [sighs] Well at the rehersal, I betrayed Twily when she needed me the most.
Fluttershy: We did the same.
General Dedrich: You did what?!
Shining Armor: I betrayed my little sis.
Dusty: [to Shining Armor] You betrayed Twilight at your wedding rehersal and never told me about it? So much for Volo Pro Veritas.
Shining Armor: (to the engines and Agents) Can we have a moment with the General and Dusty alone, please?
(the engines and Agents leave)
General Dedrich: Captain, what happened?
Shining Armor: When we were getting my wedding together, Twily noticed Cadance was acting in strange way.
Applejack: Twilight talked to us about ti, but we didn't listen to her.
Rarity: We were too caught up on the wedding to listen.
Shining Armor: Then when she came into the hall on the rehersal, she claimed Cadance was and she ran away crying. I was so mad at her, I told her not to show up at all.
Spike: We joined Shining Armor's side and left Twilight behind.
Dusty: So, you turned your backs on her for the wedding.
Shining Armor: Yes, then on the day of the wedding Twily came in with the real Cadance.
Dusty: Real Cadance? But if she was the real one, then who was the Cadance standing next to you?
Pinkie: She was really Queen Chrysalis in disguise.
Shining Armor: if it wasn't for Twily, Thomas, and Percy; Queen Chrysalis could've won.
Dusty: You turned you backs on Thomas and Percy too?!
General Dedrich: So, if I understand correctly; you betrayed your sister, her tank engine and his best, best friend, for your wedding?
Shining Armor: Yes General. And now I regret everything I did, [he bows his head down in shame as his eyes droop] I should've listened to Twily and taken her seriously. But I failed her, and Canterlot.
Applejack: [places her hat over her chest] And Wer' just as bad.
Dusty: So you put your pride and the wedding in front of friendship and family? Some friends you are! I wouldn't accept you as friends if you did the same for me. [to Shining Armor] But you're ten times worst, you betrayed your sister. That's even worst than you guys turning your backs on the Cutie Mark Crusaders.
General Dedrich: Crophopper's right. I always remembered this motta, "Amigos and Family be gold". It means: "I think of Friends and Family more than anything." [To Shining Armor, Twi's friends, and Spike] Clearly you don't. [to Shining Armor] And worst of all Captain, you failed in your line of duty of being "Captain of the Royal Guard." If you guys were in the Trolley Fighters, I'd throw you out. I put my own son in front of everything else, he's more important to me than anything else; including weddings, parties, or any other fancy shindigs.
Dusty: I don't think Skipper would be happy to hear what you did either.
General Dedrich: Yeah, Skipper Riley wouldn't like it either.
Rainbow: Wait just a minute! How did you know Skipper?
General Dedrich: The Trolley Fighters often had help from the Jolly Wrenches, I even meet Skipper before he flew his mission. The Trolley Fighters also use a few Corsairs.
T.C.:[comes in] But father, I thought you also had P-51 Mustangs and Spitfires.
General Dedrich:That's right son. Now with this said, let's go find Thomas!
[the group race down the hall]