Now, I know if you create an entity for Garrysmod you can put it into a map by just adding an entity with its name, and I know how to make FGD files and use them and whatnot. But my real question is communication between them. To explain this I think its best to do an example.
So, I make an entity called “material_barrel” and this barrel has different types that are calculated when it’s spawned. It spawns a different kind of barrel depending on what weapon your holding.
Now, I want to make a map that has these barrels, but you can choose what material it will be.
This is what the FGD would be:
[…] = material_barrel:
“Its just an example, people”
barrel_types(choices) : “Type” : 0 =
0 : “Oil”
2 : “Gas”
3 : “Crack”
So, I spawn an entity, and pick “Crack” (what did you think I’d pick?). Now, I what I expect to happen is to have the barrel spawn as “Crack” when themap loads. How do I make the Lua script get what is set in the map?