OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: SH@dow 113 on 22 Jul 2004, 14:44:55

Title: Laptop {geo LOD problem}
Post 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)
Title: Re:Laptop {geo LOD problem}
Post by: Peter_Bullet on 22 Jul 2004, 15:12:29
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...
Title: Re:Laptop {geo LOD problem}
Post by: SH@dow 113 on 22 Jul 2004, 15:22:01
oh, i do understand  :P, i totally forgot about them  :-[. So can i call 1 cube around the laptop component 1?
Title: Re:Laptop {geo LOD problem}
Post by: Peter_Bullet on 22 Jul 2004, 15:23:12
Yapp! As far as I know ;) I hope this helped!
Title: Re:Laptop {geo LOD problem}
Post by: SH@dow 113 on 22 Jul 2004, 15:25:55
it did  ;D, manny thx ;)
Title: Re:Laptop {geo LOD problem}
Post by: Peter_Bullet on 22 Jul 2004, 15:26:54
You're welcome! ;)
Title: Re:Laptop {geo LOD problem}
Post by: SH@dow 113 on 22 Jul 2004, 15:49:09
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:
Title: Re:Laptop {geo LOD problem}
Post by: Peter_Bullet on 22 Jul 2004, 15:52:29
The action will be automatically deleted if you destroy the object... I hope I understood it right.... ;)
Title: Re:Laptop {geo LOD problem}
Post by: SH@dow 113 on 22 Jul 2004, 15:59:25
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.
Title: Re:Laptop {geo LOD problem}
Post by: ScouseJedi on 22 Jul 2004, 19:58:30
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
Title: Re:Laptop {geo LOD problem}
Post by: Peter_Bullet on 23 Jul 2004, 07:01:17
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! ;)
Title: Re:Laptop {geo LOD problem}
Post by: ScouseJedi on 23 Jul 2004, 21:23:30
I did refer to 'proper' code and Bratty uses 'this' in his tow script..

Code: [Select]
                     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

:)
Title: Re:Laptop {geo LOD problem}
Post by: SH@dow 113 on 30 Jul 2004, 12:39:20
thx all ;D, srry for the late reply but i was gone for a week ;)