obj:setNode() works in real time. Example: Code: local node = { cid = #v.data.nodes+1, pos = vec3( 0, --x 0, --y 0 --z ), nodeWeight = 4, type = 0, --NORMALTYPE = 0 NODE_FIXED = 1 frictionCoef = 1, slidingFrictionCoef = 1, treadCoef = 0.5, name = "testNode"..(#v.data.nodes+1), selfCollision = true, collision = true, staticCollision = true, nodeMaterial = "|NM_METAL", getNodeMaterial = function(self) local mat,matMap = particles.getMaterialsParticlesTable() self.nodeMaterial = particles.getMaterialIDByName(mat, split(self.nodeMaterial,"_")[2]) return self.nodeMaterial end } obj:setNode(node.cid, node.pos.x, node.pos.y, node.pos.z, node.nodeWeight, node.type, node.frictionCoef, node.slidingFrictionCoef, 1.75, 1, 1, 0, 0, 0.5, node.treadCoef, node.name, math.huge, -1, node.selfCollision, node.collision, node.staticCollision, node.getNodeMaterial(node)) v.data.nodes[node.cid] = node
Will try this, thanks! --- Post updated --- IT WORKED! What I was missing was the last line! --- Post updated --- It crashes the game after using the function more than once and reseting the vehicle, any ideas why? And is it possible to delete a node? --- Post updated --- This is now a thread for the gun mod because it didn't have one before. I added a laser sight with 90m range: More progress will be posted later. Yeah they are way too small lmao, make them bigger, and would be cool if you added a proper sight model, has to be below the barrel because gravity
Nice texture usage, also I made the sight turn on with headlights and adapted Jbeam to the new model. Next I'm adding a dummy, maybe tomorrow.
Bump, repeating original questions so more people see them: How do I add multiple nodes in real time without crashing the game on vehicle reset? Is it possible to delete nodes in real time, if yes then how?
Bumping here, but the new update added a visualisation for the cannon to see where you are aiming, used for the cannon missions. Could this possibly be adapted to be straight (well it would probably curve slightly, but it would be pretty straight compared to the cannon) instead of curving with gravity, then used on this mod?
Not needed since we already have a laser sight with way higher range than that. And laser sight is attached below the barrel so it's pretty precise when it's straight even considering gravity.
Sorry for bump but i have a suggestion When your wip dummy mod will be released , Can you add a sitting dummy to the machine gun ?
There is a standing dummy for D-Series gun, sitting would make no sense. Also idk if this update will ever happen since nobody bothered answering my original question for months, I might release a version like in the T-80UD with slightly less lag but not as little as I would like
That system still lags when you have like a thousand bullets, I wanted to raise the limit but I can't do it like this