Author Topic: Sky.delete() madness!  (Read 1707 times)

So after deleting the ground accidentally because Space told me to remove the flammable checks, we were stranded on a baseplate. Told me to do sky.delete(); and well, here we are.










how2delete floor?
Code: [Select]
function fire(%brick) {
if(!$AllowFire) return;
if(!isObject(%brick)) return;
if(!isFlammable(%brick) && !isRaw(%brick)) return;
schedule(getHeatSpread(%brick),0,"fire",%brick);
if(!%brick.value[$Burning]){
%brick.schedule(getLifetime(%brick),"delete");
%brick.setColor(0);
%brick.setEmitter(BurnEmitterA);
%brick.setLight(OrangeFireLight);
%brick.value[$Burning] = true;
}
%rad = getBiggestSize(%brick)*2;
//echo(%rad);
initContainerRadiusSearch(%brick.getPosition(),%rad,$TypeMasks::FxBrickObjectType);
while(%searchObject = containerSearchNext()) {
//echo(%searchObject);
if(%searchObject.value[$Burning] == false) {
if(spreadFire(%brick) == true){
//echo("Set brick " @ %searchObject @ " on fire!");
fire(%searchObject);
}
}
}
}

to

Code: [Select]
function fire(%brick) {
if(!$AllowFire) return;
if(!isObject(%brick)) return;
//if(!isFlammable(%brick) && !isRaw(%brick)) return;
schedule(getHeatSpread(%brick),0,"fire",%brick);
if(!%brick.value[$Burning]){
%brick.schedule(getLifetime(%brick),"delete");
%brick.setColor(0);
%brick.setEmitter(BurnEmitterA);
%brick.setLight(OrangeFireLight);
%brick.value[$Burning] = true;
}
%rad = getBiggestSize(%brick)*2;
//echo(%rad);
initContainerRadiusSearch(%brick.getPosition(),%rad,$TypeMasks::FxBrickObjectType);
while(%searchObject = containerSearchNext()) {
//echo(%searchObject);
if(%searchObject.value[$Burning] == false) {
if(spreadFire(%brick) == true){
//echo("Set brick " @ %searchObject @ " on fire!");
fire(%searchObject);
}
}
}
}

or just do groundplane.delete();?

or just do groundplane.delete();?
Ot look at the floor, say /getid then do IDHERE.delete();

Yes but the groundPlane deletion was an accident so we deleted the sky as well.

and if I managed to make a fully functional firescript, don't you think I would know about object.delete()?

Yes but the groundPlane deletion was an accident so we deleted the sky as well.

and if I managed to make a fully functional firescript, don't you think I would know about object.delete()?
yeah but your answer to crazy was a bit over complicated

anyways, cool, this is your own fire mod. Haven't seen a good fire mod in literally years, though i know a few are developing some atm

The only issue with it is very fast fire spreading. :C


that didn't answer his question at all...
that's how it happened
It completely explains what happened
In its entirety.
(He was testing his fire mod but it deleted the ground along with bricks)