OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: SH@dow 113 on 22 Jul 2004, 14:44:55
-
As the title ses, im making a laptop (that actually is finished). But i got 1 problem, i keep walking true it, onley walking cause i can shoot it to hell and its broken :P. I tried everything, from making an exact copie to just a box from 200 kg mass around it. Can anyone help pls :-[.
Thx in advance :cheers:
(http://img35.exs.cx/img35/7734/laptop3.jpg)
-
In ofp geo LODs require named selections
So: Your geo lod must be built up from one or more cubes (shape is free, but don't make it too complicated or it won't work)
Then name every part in the GEO LOD like: component01 the second one component02 and so on...
If you didn't understand, let me know...
-
oh, i do understand :P, i totally forgot about them :-[. So can i call 1 cube around the laptop component 1?
-
Yapp! As far as I know ;) I hope this helped!
-
it did ;D, manny thx ;)
-
You're welcome! ;)
-
k now that problem is fixed i got another question. What line do i put in the config.cpp to let the open/close laptop action disapere after the laptop is destroyed?
thx in advance :cheers:
-
The action will be automatically deleted if you destroy the object... I hope I understood it right.... ;)
-
nope, the action isnt deleted when the object is destroyed.
Its still in the actionmenu, but offcourse u dont c the screen go open/close again :P.
-
The components in the GeoLOD need to be at least 0.5m thick and have mass so that could be another source of problems.
In the config when you define the useraction there should be something like..
condition=....
(This is from the top of my head as this isn't my thing at all)
condition=this isAlive;
or something like that - if the unit is destroyed then the useraction will not appear. You might need to check out the comref or ask a scripter what the condition would be but this is where you need to put it
-
Jedi is quite right, exept that you write in the condition field:
Condition="alive _this select 0"; In configs, you don't use this, you use _this select 0 :P
I hope this helps! ;)
-
I did refer to 'proper' code and Bratty uses 'this' in his tow script..
class pakuhook
{
displayName="UnHook Trailer";
position="hitch";
radius=4
condition="this animationphase ""stand_anim"" != 0 and speed this == 0";
//
Now, Im not a coder but I think that the global 'this' might be required for MP - but don't quote me on that
:)
-
thx all ;D, srry for the late reply but i was gone for a week ;)