Home   Help Search Login Register  

Author Topic: Getting rid of craters  (Read 743 times)

0 Members and 2 Guests are viewing this topic.

Offline Mud_Spike

  • Contributing Member
  • **
Getting rid of craters
« on: 16 Nov 2004, 22:34:34 »
Is there any way to remove a crater created by a (camCreated) shell?

There is no problem finding the crater, nearestObj returns it just fine,
but neither camDestroy nor deleteVehicle seems to be able to get rid of it.

Anyone run in to the same problem and managed to solve it?

I believe all these craters (created by a mortar script) degrade performance,
or at least occupy valuable object space for maxObjectsSeenAtAnyGivenTimeBlaBla.
And even if thats not the case, it looks silly with a swiss desert.

Just for reference:
Code: [Select]
...
_tmp = "shell120" CamCreate _p
_obj = NearestObject _p
? (typeOf _obj == "Crater"): camDestroy _obj ; deleteVehicle _obj
deleteVehicle _tmp
camDestroy _tmp
...
And yes, the typeOf check does match.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Getting rid of craters
« Reply #1 on: 16 Nov 2004, 22:44:55 »
Perhaps you could setpos them away? But I believe craters are treated differently from other objects, since they are "effects", so it may not be possible.

Another option would be to use less shells :). How many are you using anyway? And in how small of an area? Most arty strikes are quite excessive, IMO.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Getting rid of craters
« Reply #2 on: 16 Nov 2004, 22:59:39 »
yes, craters are treated differently.
I am having the opposite problem for a script, and i can't create craters, i would suggest using barrons solution...

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Getting rid of craters
« Reply #3 on: 16 Nov 2004, 23:01:19 »
What about camcreating two shells (not as powerful tho) at the same pos just a centimeter or so above the ground? It'll have the same effect but no crater.

:beat: *Gets Shot* :beat:

Offline Mud_Spike

  • Contributing Member
  • **
Re:Getting rid of craters
« Reply #4 on: 16 Nov 2004, 23:01:50 »
@GB
Not a bad idea that, thanks buddy!

Oh, I dont know, a somewhat largish desert area on Tonal is being shelled heavily for a couple of minutes by 4-5 simulated mortars, usually ends up at around 150 shells.
« Last Edit: 16 Nov 2004, 23:02:20 by Mud_Spike »

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Getting rid of craters
« Reply #5 on: 17 Nov 2004, 02:21:26 »
Well, I don't even know if my idea will work... but dmakatra's idea is actually pretty clever, and would almost certainly work.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!