Home   Help Search Login Register  

Author Topic: Returning clutter?  (Read 2468 times)

0 Members and 1 Guest are viewing this topic.

Offline DMarkwick

  • Contributing Member
  • **
  • I'm a llama!
Returning clutter?
« on: 04 Sep 2012, 23:32:42 »
Is there a way to return local clutter objects? NearestObjects returns many things, and some of these things are null-objects, which I fear are the clutter objects I'm looking for.

Is there a way for me to return a list of clutter objects close to a position? Hopefully it won't involve finding what sort of terrain I'm on & then digging through the config to find clutter that way :)

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Returning clutter?
« Reply #1 on: 05 Sep 2012, 08:28:59 »
I think a whiles away I was able to return them, this was in A1 but you couldn't do anything to them, for example setDamage or position and so on did nothing at all.
Dunno if this is possible in A2.
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline DMarkwick

  • Contributing Member
  • **
  • I'm a llama!
Re: Returning clutter?
« Reply #2 on: 05 Sep 2012, 09:32:45 »
Being able to return some info would be helpful to me, like model name or something. I don't wish to affect clutter, but to create new clutter objects (although I know it won't be "clutter" as such). I'm intending to attach it to the player to break up his outline, give a sort of camouflage ability using local ground clutter.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Returning clutter?
« Reply #3 on: 05 Sep 2012, 10:35:54 »
Bah, just tried this in A1 and I couldn't detect the clutter so I probably remembered wrong :(

Now to think of it I think I read somewhere once that the clutter is kinda like particles so they don't exist as regular objects.
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Returning clutter?
« Reply #4 on: 10 Sep 2012, 16:24:18 »
If we are talking grass/shrubs, then there must be a way to detect them since the player can crush them under his weight, while prone or create noise by friction when he is against a bush. It will probably be buried in the code like other objects that BIS, for some reason, decided to not allow for ID's

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Returning clutter?
« Reply #5 on: 10 Sep 2012, 19:48:00 »
Quote
If we are talking grass/shrubs, then there must be a way to detect them since the player can crush them under his weight
The grass clutter is not placed on the terrain when the terrain is created but it's actually defined in the config so that you define on which kind of ground texture a particular clutter type appears, so it's basically procedurally generated when you load up the terrain (or the "typing" is for the streaming, what ever).

So the clutter is not even a regular map object.

Bushes are a different story since they have to be placed on the terrain while creating it thus being normal map objects.

However, there really is no named properties or config values that would define the clutter to react with the player so I'm guessing there's some hardcoded engine thingy making objects with certain name to be treated as clutter (all the clutter objects are named clutter_****.p3d) or something. :dunno:
Basing this theory on the fact that I have clutter on the terrain I'm developing that doesn't react with the player and the clutter model name doesn't start with clutter. :dunno:

Detecting the clutter would not be a fool proof thing even if it was possible because if you turn the terrain detail low enough the clutter disappears..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline F2kSel

  • Members
  • *
Re: Returning clutter?
« Reply #6 on: 11 Sep 2012, 00:10:40 »
I think your right I've never seen grass returned but I think trees start with t_   and bushes b_   

t_betula1f.p3d,5640: b_betulahumilis.p3d,5647: t_betula1f.p3d,5604: b_salix2s.p3d,5605:

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Returning clutter?
« Reply #7 on: 11 Sep 2012, 09:21:09 »
Oh, and I was by mistake looking at my A1 folders, as in A2 the clutter objects start with c_  (obviously ) :P
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline DMarkwick

  • Contributing Member
  • **
  • I'm a llama!
Re: Returning clutter?
« Reply #8 on: 06 Oct 2012, 18:38:17 »
So the clutter is not even a regular map object.

As far as I can tell clutter is a little like particles, with no way to return what you're looking at :(

Quote
Detecting the clutter would not be a fool proof thing even if it was possible because if you turn the terrain detail low enough the clutter disappears...

I guess so, but I'm not interested in making it foolproof, I reckon if you cannot see clutter you cannot use it... :)

But anyway, the idea seems to be DOA :(

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: Returning clutter?
« Reply #9 on: 17 Oct 2012, 23:43:20 »
Linker made a similar addon for a1
 You answered the best method in your original post :)

 Do a surfacetype check and then get text clutter probability and use that as your clutter array for your camouflage :).

  Beauty is with things like this you can probably make predefined arrays by just going in the config ,so save on the CPU time or more lng winded but more precuse visual way by doing ground work in editor and diag_log your predefines out to arma.rpt.
 I have done live checks before using surfacetype method to determine what clutter should be thrown during explosion .


 
« Last Edit: 17 Oct 2012, 23:45:32 by DeanosBeano »
I love ofp