OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: modderman on 19 May 2005, 02:07:52

Title: Patriot Missile
Post by: modderman on 19 May 2005, 02:07:52
Im working on a Patriot Missile Launcher, and i need some help....
Is there anyway to get proxy weapons to rotate with the gun turrent...?

I'm guessing no, so i tried a static approach with scripts....
where the missile is part of the turrent and set the missile texture to nothing when it is fired....

I did the "sections" command in the .cpp
class CfgModels
{   
   class Default {};
   class Vehicle: Default {};
   class Patriot: Vehicle    
   {
   sectionsInherit="Vehicle";
   sections[]={"zmi01", "zmi02","zmi03","zmi04"};
   };
};


but i cant get the missile to dissapear ....when i use this command...
launcher setobjecttexture[0, ""]

Any help????
Title: Re:Patriot Missile
Post by: Planck on 19 May 2005, 02:15:35
Hmmmmmmm........I think you need to declare the hiddenselections in the cfgVehicles section of the config.

hiddenSelections[]={"zmi01", "zmi02","zmi03","zmi04"};

Or something very similar.


Planck
Title: Re:Patriot Missile
Post by: Pilot on 19 May 2005, 04:14:02
I don't think you need to do this setobjtexture stuff.  When you select the points for the turret, be sure to include the proxies with that selection.  If you do that, then the missiles should rotate with the turret.

-Student Pilot
Title: Re:Patriot Missile
Post by: DBR_ONIX on 19 May 2005, 14:58:05
Was about to suggest http://www.dc3d.co.nz/Tutorials/index.htm
But "the webserver where this was located has lost the files. Hopefully the tutorial will be rewritten soon."... damnit :(
Basicly invoved setobjecttexture
- Ben
Title: Re:Patriot Missile
Post by: modderman on 23 May 2005, 01:01:23
I got the "hiddenselection" command to work...
but i cant seem to get the proxy way to work.....any ideas.....

p.s how do you create soldiers through a script
i used camcreate & createvehicle, but it crashes after like 10 secs...?
so how do i use the createunit command....