First, add a guard and assign him a 04XX action block. Make sure you notice what guard ID is shown.
Now is where it gets tricky. Open the objects window by Edit Setup -> Edit Objects. If you want to add a key, add a 04 object. If you want him to give you a weapon, add a type 08 object. We’ll add a key, type 04 object.
Change the preset to “Attached to Guard”, and choose the guard ID we selected. Also modify the Locked Door tags in the bottom right, so you can match to a locked door.
Now add a 16 object tag.
Choose this key we found before.
OK, phew, enough in the object window, now lets get back to the action blocks.
In the 04XX block we made, we just do a simple block here. Detect if Bond is close to the guard, then if so, give Bond the 16 object. We also added text, because you can say something while giving it to Bond.
Lastly, lets have fun with the objects window and rename the key, since it’s a “.”.
Add a type 25 object, the Rename Object.
Make sure it refers to the key we made, and override the Yale Key Object. When you are making a level, ordinarily you’d also edit the text bank for it (just the Runway one here), and then it would say things like “X-Ray Scanner”, “Kit”, etc. And then the rest of the text is for the weapons window.
You can see it renamed now. As usual, the text bank MUST be loaded or else the game will be crash. You also can rename opening doors, and pickups of weapons.