Me again. I want to ask a question about getting object to interact with each other. I know that one object can call a function on another object. My probablem isn't that straight forward. Heres what im trying to do:
I am making a level edit (that bits easy). but nearly every object can interact with each other. For example a switch object can turn a light object on/off/ or set the brightness level/colour.
Now, i could 'hard code' the switch object so that it know about all the different function calls it can perform on the light object. But if i have, for example, a 100 objects i don't want to hard code each one so it knows about the other 99!
So... and here comes the question after all that (assuming i haven't lost u!)... how can u get objects to know about other objects callable functions during run time? Ie maybe it could do some sort of query to say "What functions do u have i can call, and what parameters can i set?"
Any ideas, Thanks all
I am making a level edit (that bits easy). but nearly every object can interact with each other. For example a switch object can turn a light object on/off/ or set the brightness level/colour.
Now, i could 'hard code' the switch object so that it know about all the different function calls it can perform on the light object. But if i have, for example, a 100 objects i don't want to hard code each one so it knows about the other 99!
So... and here comes the question after all that (assuming i haven't lost u!)... how can u get objects to know about other objects callable functions during run time? Ie maybe it could do some sort of query to say "What functions do u have i can call, and what parameters can i set?"
Any ideas, Thanks all