Solved Particles not working

Discussion in 'Mod Support' started by chris_lucas, Jul 1, 2016.

  1. chris_lucas

    chris_lucas
    Expand Collapse

    Joined:
    Dec 12, 2012
    Messages:
    1,444
    I tried to add smoke to my steam locomotive without success.

    Code:
        obj:addParticleByNodesRelative(smoke_origin, smoke_origin2, 0.0, 0.0, 0.0, 16)
    Code:
    local function onInit() 
        for k, node in pairs (v.data.nodes) do
            if node.name == "stack" then smoke_origin=k  end
            if node.name == "35r" then smoke_origin2=k  end
        end
    end
     
  2. LuisAntonRebollo

    LuisAntonRebollo
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Feb 25, 2014
    Messages:
    117
    This is the correct way to use the function.

    addParticleByNodesRelative(nodeId1, nodeid2, velocity, particleType, width, count)

    In your code you set particleType to 0, this link the particle with the BNGP_0 that is not existing.

    Try to use a valid particleType, check "art\shapes\particles\managedParticleEmitterData.cs"
     
  3. synsol

    synsol
    Expand Collapse
    QA Lead
    BeamNG Team

    Joined:
    Aug 4, 2013
    Messages:
    1,471
    Hey Chris , did your steam smoke particles work now ?
     
  4. chris_lucas

    chris_lucas
    Expand Collapse

    Joined:
    Dec 12, 2012
    Messages:
    1,444
    Thank you very much, it's working perfectly now.
     
    • Like Like x 1
  5. synsol

    synsol
    Expand Collapse
    QA Lead
    BeamNG Team

    Joined:
    Aug 4, 2013
    Messages:
    1,471
    Great ;)
     
    • Like Like x 2
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice