OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: stephen271276 on 28 Sep 2009, 15:48:09

Title: Classnames
Post by: stephen271276 on 28 Sep 2009, 15:48:09
Hi guys have searched and searched and searched....
How do I find the classname of an object on the map?
Title: Re: Classnames
Post by: i0n0s on 28 Sep 2009, 16:03:32
Code: [Select]
nul = [] spawn {
while {true} do {
  waitUntil{!isNull cursorTarget};
  _target = cursorTarget;
  Player sideChat typeOf _target;
  waitUntil{_target != cursorTarget};
};
};
Title: Re: Classnames
Post by: stephen271276 on 28 Sep 2009, 16:33:18
AAARgh wont work on lamp posts???
Title: Re: Classnames
Post by: Planck on 28 Sep 2009, 17:02:43
Streelamps are cfgNonAiVehicles as opposed to cfgVehicles.

They do have classnames though:
Code: [Select]
class Land_lampa_sidl: StreetLamp_BaseMediumOrange
 {
  scope = 1;
  model = "\ca\buildings\Misc\lampa_sidl";
 };
 class Land_lampa_sidl_2: StreetLamp_BaseMediumOrange
 {
  scope = 1;
  model = "\ca\buildings\Misc\lampa_sidl_2";
 };
 class Land_lampa_sidl_3: StreetLamp_BaseMediumOrange
 {
  scope = 1;
  model = "\ca\buildings\Misc\lampa_sidl_3";
 };
 class Land_lampa_ind: StreetLamp_BaseWeakYellow
 {
  scope = 1;
  model = "\ca\buildings\Misc\lampa_ind";
 };
 class Land_lampa_ind_zebr: StreetLamp_BaseWeakYellow
 {
  scope = 1;
  model = "\ca\buildings\Misc\lampa_ind_zebr";
 };


Planck
Title: Re: Classnames
Post by: stephen271276 on 29 Sep 2009, 16:38:36
Tried these using the "createVehicle" command but wont work???? help
Title: Re: Classnames
Post by: Planck on 30 Sep 2009, 01:19:10
It does work with createvehicle.

Try:

fred = "Land_lampa_sidl" createVehicle getPos player


Planck
Title: Re: Classnames
Post by: The-Neurocyber on 11 Oct 2009, 00:12:46
I have used the i0n0s code it works fine : Thanks!

But some objects don't seem to have any classnames
They aren't in the great Armatech reference list either..

I actually look for the walls and fences classnames, only some part are enlisted but not enought to build something nicely. So I unPbo the official addon and I found the proper p3d files.

Here are the object's p3d that I would like to know their classnames:
Wall_CBrk_5.p3d
Wall_CBrk_Corner.p3d
Wall_CBrk_End.p3d
Wall_CGry_5.p3d
Wall_CGry_Corner.p3d
Wall_CGry_Corner_2.p3d
Wall_CGry_End.p3d
Wall_CGryLow_5.p3d
Wall_CGryLow_End1.p3d
Wall_CGryLow_End2.p3d
Wall_CTan_5.p3d
Wall_CTan_End.p3d
Wall_CTan_Pole.p3d

ok the list is pretty long, so I won't put them all..
The fact is that most of the gates and doors are enlisted in classnames references but almost none of the walls are there. Actually  I don't figure the use of gates and doors if I can't even use the wall they're made for.
Are those classnames did even exist? Or I'll have absolutly to use some of the editor upgrade addons to use them?
Since almost all the houses and building are present I really don't understand why BIS would not have put the walls and fences too.
Title: Re: Classnames
Post by: DeanosBeano on 11 Oct 2009, 00:46:14

 This happens because Bis just use them in the island making process and dont make all accessible ( don't know why).

 Here is the config for wall structures , you probably saw it when you found p3ds.

http://pastebin.com/m1cda453e

 Class name  is simply  Land_Wall_CBrk_5_D

 But because it possibly inherits from something that has Scope = 1 or 0  then you cannot see it in editor additionally  if it is  scope = 0 then you cannot createvehicle it neither.


 
Title: Re: Classnames
Post by: The-Neurocyber on 11 Oct 2009, 01:49:33
Hum ..well, looks like I've got to use sandbags walls for now.
When I got time I'll build a specific addon with all objects I'll need.
It's really too bad that BIS didn't put them all.
I think god hates me.
Anyway thanks for your reply.
Title: Re: Classnames
Post by: Planck on 11 Oct 2009, 02:58:39
Code: [Select]
Try the list on OFPEC of all classnames in ArmA2, it is complete as far as I can see, it also includes the castle walls.

http://www.ofpec.com/COMREF/index.php?action=read&id=209

For Example:
[code]
Land_A_Castle_Bastion
Land_A_Castle_Gate
Land_A_Castle_Wall1_20
Land_A_Castle_Wall1_20_Turn
Land_A_Castle_Wall1_Corner
Land_A_Castle_Wall1_End
Land_A_Castle_Wall1_End_2
Land_A_Castle_Wall2_30
Land_A_Castle_Wall2_Corner
Land_A_Castle_Wall2_End
Land_A_Castle_Wall2_End_2
Land_A_Castle_WallS_10
Land_A_Castle_WallS_5_D
Land_A_Castle_WallS_End
Land_A_Castle_Stairs_A
Land_A_Castle_Wall1_Corner_2
Land_A_Castle_Wall2_Corner_2
Land_A_Castle_Bergfrit
Land_A_Castle_Bergfrit_dam
Land_A_Castle_Donjon
Land_A_Castle_Donjon_dam

Planck[/code]
Title: Re: Classnames
Post by: savedbygrace on 20 Dec 2009, 17:06:03
So, how exactly is that code used, that Ionos posted?

EDIT: Nevermind, just used the code
Quote
hint typeof this
in the init field of the object.