LUA Coding interaction with Valve Hammer?

Well, I want to make a physic prop in hammer on my roleplay map (mrp_stonewall) and I was wondering if theres anyway for to get my LUA code to interact with an object in the map. Like if I spawned an object in Hammer with its name set as “heybob”, would I be able to go into my lua code and make a function that deleted the entity “heybob” without having to look at it? like heybob:Kill()?

I haven’t done this in a while but what I did was made an Entity in my entities folder and changed some stuff around. I think the Type was set to Point, Went in Hammer and created a random entity. Renamed it to the folder name of the entity I created, then it worked fine in game.

Hmm. This sounds good but I am putting an NPC in my map and i need to make a menu that pops up when i press E on the npc. I already have the menu ready i just need to set up the npc.