In the Quake 4 console, there is a "spawn" command, then you put the class name of what you want to spawn, eg. "spawn weapon_railgun".
>Meaning that it tried to construct the weapon_railgun class from this input.
If the class that you specify is not one that can be spawned, it says something like this: "[class_entered] does not have a spawnfunc or a spawnclass".
>Meaning that they were able to know if weapon_railgun had a spawnfunc.
What I want to know is how they could've inplemented this:
1) How would you be able to construct a class from a string of user input?
2) How would you be able to search a class to see if it has a function or data in it?(such as spawnfunc)
Thanks for your time