Michael Betke Posted February 26, 2010 Share Posted February 26, 2010 I'm using this Emittereditor 1.0 and managed to make a nice underwater particle. But after saving the emitter to .lua and placing it in my level the emitters are acting different. My particle should flow in the air, rotate and move a bit. In Sandbox Editor it flows upwards very fast. Plus the particles are flickering which looks odd. In emitterEDitor theres all fine. Here's the .lua I get exported: require('scripts/class') local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) if fw~=nil then SetWorld(fw.transparency.world) object.Unterwasser=CreateEmitter(100,20000,Vec3(0,0,0),0,object.model) object.Unterwasser:SetPositionf(0,01,0,0,02) object.Unterwasser:SetOrder(0, 0) object.Unterwasser:Paint(LoadMaterial('abstract::unterwasser.mat'),0) object.Unterwasser:SetRadius(0,2,0,2) object.Unterwasser:SetColorf(1,1,1,1) object.Unterwasser:SetWaver(0,5) object.Unterwasser:SetVelocity(Vec3(-0,02,-0,01,0,01),Vec3(0,0,0)) object.Unterwasser:SetRotationSpeed(0,06) object.Unterwasser:SetArea(Vec3(12,12,12)) SetEmitterAcceleration(object.Unterwasser, Vec3(0,0,0)) SetWorld(fw.main.world) end function object:SetKey(key,value) if key=='color' then elseif key=='intensity' then else return self.super:SetKey(model,key,value) end return 1 end function object:GetKey(key,value) if key=='color' then elseif key=='intensity' then else return self.super:GetKey(model,key,value) end return value end function object:Render() end end Suggestions? Quote Pure3d Visualizations Germany - digital essences AAA 3D Model Shop specialized on nature and environments Link to comment Share on other sites More sharing options...
Michael Betke Posted February 26, 2010 Author Share Posted February 26, 2010 Oh just found it out mayself. This is silly. The Edmitter Editor exports like this: object.Unterwasser:SetPositionf(0,01,0,0,0,02) But Leadwerks understands needs it with points and no commas object.Unterwasser:SetPositionf(0.01,0.0,0.02) I need to change this in the .lua after export. Maybe it will help someone else. Seems I tunr into a coder now, hehe... Quote Pure3d Visualizations Germany - digital essences AAA 3D Model Shop specialized on nature and environments Link to comment Share on other sites More sharing options...
macklebee Posted February 26, 2010 Share Posted February 26, 2010 hmmm weird... your code just crashes my editor no matter what... but in any case, why are you re-inventing the wheel? the emitter entity that comes with the editor has all of the options that you are setting and you dont even have to touch the script... just change the properties dialog to the settings you want... Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 26, 2010 Share Posted February 26, 2010 has anything changed since the particle editor was created and 2.31 ? ... but I agree with mack try setting up a normal emiiter in the editor to your settings, atleast then you have a comparison? Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Michael Betke Posted February 26, 2010 Author Share Posted February 26, 2010 I used the Emitter Editor because it seems to be a nice program. Plus it can export my emitters so I can reuse them like models in several levels. With the build in emitter I have to set it up each time again. This is the main reason. Quote Pure3d Visualizations Germany - digital essences AAA 3D Model Shop specialized on nature and environments Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 26, 2010 Share Posted February 26, 2010 I agree it seems like a nice program but was created a "few syncs" ago and maybe needs updating? I thought it just saved the a script? dont yu still have to create the object and folder? Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Michael Betke Posted February 27, 2010 Author Share Posted February 27, 2010 No it creates a .gmf, lua and .phy file. Well I think I'll use it a bit more and enter my points instead of commas and all is well. Quote Pure3d Visualizations Germany - digital essences AAA 3D Model Shop specialized on nature and environments Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.