First you need to pick a preset where a guard spawns. Here lets choose preset 000D.
Now we need to add the main action block. Make this a 10XX block. Add an 8E command to change the guard ID (make it unique, though technically it can be the same as another one), set the guard health using 8F, set the guard armor if you wish (90 command).
Now lets add the BD spawn guard command. Change the preset to 000D (or whichever), the image, the head (FF for random). Now add a 04XX action block so that this guard will take this block, and we can assign him a gun. We added 040C here, and we now make sure to assign the BD spawn guard action block to 040C. Remember that this is a return value function (it can fail spawning, but not usually), so add the 02XX return, and then exit the block. Usually, you’d do a lot more stuff, and spawn multiple guards, but for now, keep it as this.
The 040C block is pretty simple. Just use the BF command to spawn a weapon, and remember that it’s a return value loop so it needs the matching 02XX. Now do a JAL to 0002, so the guard acts like a normal guard.
We’re finished, he should spawn immediately. You would likely spawn guards under certain conditions, instead of just immediately, but this is an example.