Hello all,
im passing some values to a function.
I checked the values in shootParticle, very value is fine and right. Then im getting total wrong values passed to particle.shoot. I’m looking for my fault where i could imagien it, but i cant seem to find after 1 hour. Im not famiarly with scripting or LUA as I’m coming from more like Java, C#, C++, so i guess it might be fairly easy for a more experienced LUA programmer.
Example scenario:
shootParticle output: velocity.x = 200, velocity.y = -1200, target =2
particle.shoot output: velocity 796, velocity.y 1664, target=table:07C40770 ( i addded x and y for testing purposes to look if im getting more values than wanted: x = 2 (the target value here) and y = nil (ok no more value)
local function shootParticle(velocity, target) print("@spawner! velocity: " ..tostring(velocity.x) .. " " ..tostring(velocity.y) .. " target:" ..tostring(target)) shoot\_particle:shoot(velocity, target) spawnParticle() end particle.shoot = function(velocity, target, x, y) print("@particel! velocity: " ..tostring(velocity.x) .. " " ..tostring(velocity.y) .. " target:" ..tostring(target).. " look for more: "..tostring(x).." "..tostring(y)) particle:setLinearVelocity( velocity.x, velocity.y ) pipe = target end
I would appreciate every help/clue.