drunken officer 18 Posted October 18, 2014 Hello. I've spawned objects called "test_EmptyObjectForFireBIG"; But i cant delete this objecst. But i need it, because it takes FPS. And i don't need longer then 2 mins. The command deleteVehicle doesnt work. Share this post Link to post Share on other sites
iceman77 18 Posted October 18, 2014 Post dat code. ( the announcer from the running man rings in my mind ) Share this post Link to post Share on other sites
johnnyboy 3744 Posted October 18, 2014 It's true. You cannot delete "test_EmptyObjectForFireBIG". I don't know why, probably a bug. The ship fire you see in this screenshot of my Leper Island mission is using "test_EmptyObjectForFireBIG". When the ship sinks, I want the fire to go away, so I then setpos it to position [0,0,0]. Obviously it would be better to delete it, but this works. Share this post Link to post Share on other sites
dreadedentity 278 Posted October 18, 2014 Since it can't be deleted right now, why not send it really far under the map? _obj setPos (_obj modelToWorld [0,0,-999999]; Share this post Link to post Share on other sites
killzone_kid 1326 Posted October 18, 2014 Hello.I've spawned objects called "test_EmptyObjectForFireBIG"; But i cant delete this objecst. But i need it, because it takes FPS. And i don't need longer then 2 mins. The command deleteVehicle doesnt work. Here is how to do this right from the horses mouth: http://forums.bistudio.com/showthread.php?165184-Delete-Fire-Effect&p=2515539&viewfull=1#post2515539 Share this post Link to post Share on other sites
Mr-Pink 10 Posted October 18, 2014 (edited) Moving it out of the way is one possible solution, but we have managed to remove them altogether. The following snippet of code will successfully remove all smoke/fire/bubble objects within 20m of the player that runs it. Note that this can cause lag if you put the detection range too high, so be careful how you use it on a live server. { //open foreach loop if (typeof _x == "#particlesource") then { //if current item is particle object then do deletevehicle _x; //delete particle object }; } foreach (player nearObjects 20); //repeat for all objects within 20m of player Best of luck with your continued efforts. Edited October 18, 2014 by Mr-Pink Share this post Link to post Share on other sites
Naiss 28 Posted October 18, 2014 yourobjname = "test_EmptyObjectForFireBIG" createvehicle (getpos player); hint "Object Spawned"; sleep 5; deletevehicle yourobjname; hint "Object removed"; Share this post Link to post Share on other sites
Mr-Pink 10 Posted October 18, 2014 yourobjname = "test_EmptyObjectForFireBIG" createvehicle (getpos player); hint "Object Spawned"; sleep 5; deletevehicle yourobjname; hint "Object removed"; Logic would suggest your solution should work, but in practice however things are very different. Unfortunately the only viable solution found to date is deleting by using the nearObjects command seen above. Share this post Link to post Share on other sites
iceman77 18 Posted October 18, 2014 Why not do what darkdruid says in the thread KK linked? _emitterArray = theFireName getVariable "effects"; {deleteVehicle _x} forEach _emitterArray; deleteVehicle theFireName; Share this post Link to post Share on other sites
f2k sel 164 Posted October 18, 2014 Interesting I never new of the getVariable "effects"; any reason not to just use {deleteVehicle _x} foreach (wokka getVariable "effects")+[wokka] the other thing you can do is remove elements from the array {deleteVehicle (wokka getVariable "effects" select _x)} foreach [0,1,2,3] will leave the smoke but remove the flames. Share this post Link to post Share on other sites
killzone_kid 1326 Posted October 19, 2014 Interesting I never new of the getVariable "effects"; any reason not to just use {deleteVehicle _x} foreach (wokka getVariable "effects")+[wokka] Pretty sure you need parentheses around array addition operation, but that is beside the point. One of the reasons not to do it like this is that emmiters are local vehicles and fire object is global. If you do it in mp, you dont really want to delete global fire object containing emmitters array immediately on the first execution anywhere. Share this post Link to post Share on other sites
drunken officer 18 Posted October 20, 2014 (edited) Moving it out of the way is one possible solution, but we have managed to remove them altogether. The following snippet of code will successfully remove all smoke/fire/bubble objects within 20m of the player that runs it. Note that this can cause lag if you put the detection range too high, so be careful how you use it on a live server. { //open foreach loop if (typeof _x == "#particlesource") then { //if current item is particle object then do deletevehicle _x; //delete particle object }; } foreach (player nearObjects 20); //repeat for all objects within 20m of player Best of luck with your continued efforts. MMMH, it seems this code runs not on dedicate server Edited October 20, 2014 by Drunken Officer Share this post Link to post Share on other sites
iceman77 18 Posted October 20, 2014 That's because it's using the player variable. You could run it on the client(s) though.. or change the nearObjects center to a valid object. Or... try what darkdruid posted. Share this post Link to post Share on other sites
Tajin 348 Posted October 20, 2014 Something like this should work: fnc_killFire = { { deleteVehicle _x; } forEach (_this getVariable "effects"); }; publicVariable "fnc_killFire"; lightMyFire = "test_EmptyObjectForFireBIG" createvehicle (getpos player); sleep 5; [lightMyFire,"fnc_killFire",true,true] call BIS_fnc_MP; deleteVehicle lightMyFire; Share this post Link to post Share on other sites
drunken officer 18 Posted October 21, 2014 Why not do what darkdruid says in the thread KK linked? _emitterArray = theFireName getVariable "effects"; {deleteVehicle _x} forEach _emitterArray; deleteVehicle theFireName; Maybe i'm to dumb for this.... Start the script inside the object init: [this, 50, 10] execVM "fnc\fireeffect.sqf" private ["_fire", "_dis", "_obj", "_burntime ", "_einheiten"]; if (isMultiplayer) then {_einheiten = playableUnits} else {_einheiten = switchableUnits }; sleep 1; _obj = _this select 0; _dis = _this select 1; _burntime = _this select 2; waituntil {sleep 2; {_x distance _obj < _dis} count _einheiten > 0 }; if (isServer) then { _fire= createVehicle ["test_EmptyObjectForFireBIG", (getPos _obj), [], 0, "can_collide"]; }; sleep _burntime ; _emitterArray = _fire getVariable "effects"; {deleteVehicle _x} forEach _emitterArray; deleteVehicle _fire; }; It works in the edior but not on Dedicate Server. It burn and burn and burn. What do i wrong? Share this post Link to post Share on other sites
killzone_kid 1326 Posted October 21, 2014 Maybe i'm to dumb for this....Start the script inside the object init: [this, 50, 10] execVM "fnc\fireeffect.sqf" private ["_fire", "_dis", "_obj", "_burntime ", "_einheiten"]; if (isMultiplayer) then {_einheiten = playableUnits} else {_einheiten = switchableUnits }; sleep 1; _obj = _this select 0; _dis = _this select 1; _burntime = _this select 2; waituntil {sleep 2; {_x distance _obj < _dis} count _einheiten > 0 }; if (isServer) then { _fire= createVehicle ["test_EmptyObjectForFireBIG", (getPos _obj), [], 0, "can_collide"]; }; sleep _burntime ; _emitterArray = _fire getVariable "effects"; {deleteVehicle _x} forEach _emitterArray; deleteVehicle _fire; }; It works in the edior but not on Dedicate Server. It burn and burn and burn. What do i wrong? _fire is undefined on clients, should also show error in .rpt Share this post Link to post Share on other sites
drunken officer 18 Posted October 21, 2014 i set it publiceVariable, no error. But i cant deleted it... Share this post Link to post Share on other sites
iceman77 18 Posted October 22, 2014 Maybe i'm to dumb for this... Maybe :confused: Share this post Link to post Share on other sites