LarryG on 17/8/2016 at 23:20
I'm using the NVMachine and NVMachineSlot scripts for a small manufacturing facility. All works well when the right component parts are provided for a recipe: the correct item is manufactured and it drops from the machine output marker when created. But all is not well when incorrect or insufficient component parts are provided. The script is supposed to return the bad parts at the machine output marker, which it does, but the parts don't drop until you nudge them either by bumping into them or hitting them with an arrow of some sort. I've used set game_mode_backup 0 to inspect the rejected parts, and nothing looks wrong. They look just the same as the same part created manually, which doesn't get stuck in the air. I also noticed that if I exit game mode after set game_mode_backup 0 and then return to game mode, the part which was hovering in the air drops to the ground on the reentry to game mode. I've tried using NVWakePhysicsTrap to silently bump them after they get recreated by the NVMachine script, but that doesn't help. I verified that it was getting triggered by adding NVSpy to the mix, and it was triggered, just ineffective in this instance. Next I tried triggering a small explosion next to the returned part. That had no effect either, though it did have the expected effect on a nearby copy of the same part which was not created by NVMachine. I'm at the point where I think I may need to set up a Rube Goldberg emitting of an arrow to hit the returned parts. Since hitting them with an arrow manually works, I trust that would work. But I shouldn't have to do that. What could be wrong with the returned parts? Has anyone else experienced this with NVMachine Script?
LarryG on 18/8/2016 at 13:21
I created a test mission with just the stuff necessary for NVMachine in it, and the rejected part drops just fine. :mad: Grrr. I'm now tearing down the setup in my real mission and redoing it to see if that helps.
Edit: And it doesn't. The new setup also has the rejected part hovering problem just like the old setup. Grrr. So it is something in my mission which hoses this up. Any ideas as to how to figure out what?
R Soul on 18/8/2016 at 16:04
I'm not sure, but compare all the parent archetypes of each mission if your one uses a custom gamesys. You might have changed something higher up.
gamophyte on 18/8/2016 at 16:59
I might totally be off base, but in the past when a script didn't finish it held up the rest of the mission. A guy getting caught on a door actually killed scripts for example. Re-did path finding and it was fine. But this might apply to this case in some fashion. Again I'm a noob in this area so take that with a grain.
LarryG on 18/8/2016 at 18:04
Quote Posted by R Soul
I'm not sure, but compare all the parent archetypes of each mission if your one uses a custom gamesys. You might have changed something higher up.
I don't think the problem can be in the hierarchy. To be sure, I took the mission where the problem exists, deleted EVERYTHING, and them imported a vbr of the test mission where everything worked. And everything still worked. But now all the objects are using the exact same gamsys and the exact same Mission parameters and Gamsys parameters and ... everything else that was custom about the mission where it didn't work. So something else, something I deleted is the culprit. I may try a more selective set of deletions, or I may try the Rube Goldberg arrow setup and move on.
Quote Posted by gamophyte
I might totally be off base, but in the past when a script didn't finish it held up the rest of the mission. A guy getting caught on a door actually killed scripts for example. Re-did path finding and it was fine. But this might apply to this case in some fashion. Again I'm a noob in this area so take that with a grain.
Maybe. Unfortunately there is no way obvious way to test this theory that I can think of. I've done complete processings numerous times and that doesn't fix this.
GORT on 18/8/2016 at 18:41
Hmmm... I'm going to take a stab in the dark here with the small stuff. Could it be possible that the items are getting the barrel placement effect? (A barrel being placed on the ground or near a wall, causing it to have no physics.)
LarryG on 18/8/2016 at 18:47
I have inspected the floating objects using set game_mode_backup 0 and they are not reported to monolog as having no physics. They are physically delivered into the middle of a room, not touching anything, nothing seems wrong, and yet they don't drop until touched.
GORT on 18/8/2016 at 18:54
Well, crap. I guess I'll have to try to make a test mission that uses NVMachine to see how it works. I've never used it before.
LarryG on 18/8/2016 at 19:17
As I said, it works fine in a test mission, just not in my mission.
LarryG on 18/8/2016 at 21:26
The machine now has a wash cycle. It should take care of up to 20 rejected parts. If a player exceeds that, it's on them to pull the dirty rejects out of the machine manually.