Cave Editor and Booster's Lab call entity related things that do with the .pxe files different things and it's really fucked up so I'll try to coherently explain things.
First, Entity flags are set by the Entity internally or by the .pxe file and are stored in the npc command table on an entity by entity base. BL and CE are in sync on this (though CE just calls them "flags" even though everyone when they say flags is referring to TSC flags and not CE's "Flags")
Next is the #event number, when entity flag 0x2000 (intractable/press down to run script) is set then it runs the event number in the script. pretty simple.
And Entity ID/Flag ID refers to a separate variable in the npc command table than the entity flags and should not be confused with them! Some entities have a use for them such as EXP capsules, but their primary purpose is to spawn/not spawn when the Entity/Flag ID is set via the entity flags.
It's not that hard, but just try to remember that Entity flags are not flag IDs and that Flag ID is not "flags", but Entity ID is Flag ID and Entity Flags are "flags" (not TSC flags though, but setting a TSC flag DOES make an Entity ID with the same flag ( not "flag") not spawn if 0x4000/0x800 is set in your Entity Flags but not Skipflags, they're something else completely.)
See it's really simple and easy to understand.
E: I can't believe that I've actually had to open up CE more than twice this year now just to explain this shit
good riddance