OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started 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?
-
nul = [] spawn {
while {true} do {
waitUntil{!isNull cursorTarget};
_target = cursorTarget;
Player sideChat typeOf _target;
waitUntil{_target != cursorTarget};
};
};
-
AAARgh wont work on lamp posts???
-
Streelamps are cfgNonAiVehicles as opposed to cfgVehicles.
They do have classnames though:
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
-
Tried these using the "createVehicle" command but wont work???? help
-
It does work with createvehicle.
Try:
fred = "Land_lampa_sidl" createVehicle getPos player
Planck
-
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.
-
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.
-
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.
-
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]
-
So, how exactly is that code used, that Ionos posted?
EDIT: Nevermind, just used the code
hint typeof this
in the init field of the object.