I see lucid is doing what we discussed as a possibility to his idea l
yes, thanks sol
Using the two functions I mentioned above allows you to get/set variables from other objects.
thanks rich. I have few questions, though, if anyone has a few moments
from rts(just because the code's already there, I don't plan to use rts:
795 // User defined functions
796 long ExtObject::GetData(int id, void* param)
797 {
798 switch (id) {
799 // If your extension uses a window, you can return it here
800 case 1337:
801 return (long)(pfLayoutMaps[pLayout].pfMap[params.cellsize]);
802 case 1338:
803 return (long)&waypoints;
804 case 1339:
805 return pfcellW;
806 case 1340:
807 return pfcellH;
808 }
809
810 return 0;
811 }
812 [/code:2luvbwu9]
ok, so to use this, first I would get a pointer to the object the same way I did before:
[code:2luvbwu9]CRunObject* Object = params[0].GetObjectParamFirstInstance(pRuntime);[/code:2luvbwu9]
then could I just:
[code:2luvbwu9]Object->GetData(1337)[/code:2luvbwu9] ?
is that correct? What is the second void parameter for?
also, in:
[quote:2luvbwu9] 813 long ExtObject::CallFunction(int id, void* param)
814 {
815 switch (id) {
816
817 // Write speed to param
818 case CF_GETSPEED:
819 *(float*)param = speed;
820 break;
821 }
822
823 return 0;
is CF_GETSPEED just an int const?
and if so, for the sake of form, and keeping all the plugin code uniform, is there a specific file I should define these constants in?
also, I got GetObjectParam from the ACE Table Wiki, and I got GetObjectParamFirstInstance from the RTS behavior, is there a list somewhere of all the possibilities that can be used?, and does GetObjectParamFirstInstance return the first picked instance? or just the first instance period?
as an aside, I'm so damn excited , so far this plugin thing is awesome. it's exactly what I needed for my project
thanks again for the suggestion Sol!