I started making Polyethylene just to attempt to bring a new material into the game. I've noticed that the new material will catch fire when it is next to an object that has a charge or is sparking, and I'd like to remove that behavior. The material only has 2 flamability for the time being and still manages to catch fire when it's next to an object with a spark/charge.
Is there some way I can post code here? Hmm..
http://pastebin.com/Q7BvrZ0v
(autorun.lua)
Also, this script is a good example of how to get the transitions to work right out of an LUA - the trick is to define them after all of the element properties.
The materials themselves I could use some feedback on perhaps though... especially like examples on how to balance HotAir + Loss + Air Drag + Air Loss + Advection + Gravity.
Edit: Whoops, forgot to take out the NOAMBHEAT flag I played with last, too.
Nice, that worked. Interesting that changing flamability would affect how the sparks interact with it... I never would have guessed.
I guess I'll need to just script it (the solid material at least) to interact more rapidly with flame though, because I did like how flammable it was.
Thanks.
Uh, I wouldn't even know how to unpack the game. My programming experience is minimal.
Could someone just create some LUA snippets? like;
'If surrrounding particles consist of (PT_Particle1)(PT_Particle2) etc..' then sim.partChangeType'
&
'If surrrounding particles consist of (PT_Particle1)(PT_Particle2) etc..' then sim.partCreate'
Also other snippets such as
'If surrrounding particles consist of (PT_Particle1)(PT_Particle2) etc..' AND particle is more than ___ temp(and/or pressure) then sim.partChangeType'
I know there are ways to have the particles transistion with the base code but for special cases (where another element is needed) something like that may be useful.
I can figure out the logic that I want but I don't know how to write it into code...
http://pastebin.com/iKB0psnq
(autorun.lua, plastic mod v0.1.3)
This is as far as I got, all I added was the ability to break the plastic under pressure so that bombs aren't fully contained anymore. I did add some code but it's embarassingly simple and it doesn't work the way I want it to so I kind of gave up on it (and it has been removed). I'm having a lot of trouble with sim.partCreate. For the x and y field, it seems to want to treat the entire mass of material as 'the particle' instead of a per particle basis.
Like for example in this image, I lit the one end of the material with fire and the other end starts generating a gap.
I kind of don't want to bombard the forums with threads every time I have a question about code, either.
Uh, this code is garbage but it is an example of how to get the code to update on the material (otherwise the code parses once and never gets read again) although saying this in the Lua scripting forums is kind of embarassing, I figure I should share what I know :) :
http://pastebin.com/Z3fKkG49
I tried to change the particle 4 times for the sake of seeing what would happen.
I'm not quite sure I'm understanding the createPart line yet... are you saying to have it set up like so:
createPart-1(x,y,particle) or..? Where do these numbers go exactly?