Visual Pinball. It has to run in a shell. A container. The Player.
All of the Objects, Bumpers, Triggers, etc. are contained in the Table Object, but I think the Table Object (ITableGlobal??) also runs in a shell (The Player??).
What we need is to figure out the name of the Player, the Container or Shell that all of the Objects are subordinate to and then try CreateObject with this correct reference.
Can this be found and is it doable with CreateObject? The simple test would be to figure out how to create a VBATestlib Object (the Bumper, Trigger, the parts we have available in the editor) purely in script without using the editor controls.
There is a reference to the Player, but it is only ExitPlayer().
Sleepy;
WOW, this is a good question! I never thought about this! I can assume all the commands can be found and be used via script since VP itself is a shell of VB. It would take considerable amounts of time and patience to figure all these commands in scripting. I'm sure they can be found and used but as to where to start is beyond me.
What you're asking can't be too tough to accomplish. I don't know how simple it might be to start let alone figure this all out. What a resource this would be for ANY VP author! If you do start something like this Sleepy, please let me know as I'd like to jump on the bandwagon and help a bit. As I said before, I wouldn't even know where to start! :)
d
If I had a very low end release of VB that was small, I would check out this great question. I'm sure VP can handle TONS of VB commands for what it needs to do. Who knows what other commands we might be able to use if this can all be figured out? If there is a command for ExitPlayer() then what is the starting one? OpenPlayer() ?
If VPinMame uses a .dll library doesn't that add more commands to VP using VPinMame? Also If I'm correct, isn't a .dll extension a library file that can be called by a VB program or any other proggie that can handle that extension?
A good question would be this; if a CreateObject command can be used can a .dll extension file add another object to VP? Wow, you've really got me thinking about this one. I do not use VPinMame so I don't know what it's capabilities are but if it runs in the background of VP via a .dll extension aren't you just adding more commands and objects to VP?
Also, I think it would be nice to able to bring up an object via script. That would be nice instead of using the editor. Of course Sleepy what you're asking might not be so easy but who am I to know. I'm not that advanced in the realm of programming anyway - I learned from trial and error over the years and read very few books on the subject. Why couldn't you be able to bring up an object via the script only? Should work, shouldn't it?
Now that I think about it, didn't we just do this with the the active ball demo? We called up the balls, changed the images on them and they played. That was all called up via the script and NOT the editor. Wow Sleepy, you know how to make my head hurt.
Let me know what I am missing here that I am not seeing please.