Forum Jump :

Author Message


Posts: 31
Rank:


Level: Member

Country: us
Location: tennessee
Occupation: industrial automation and robotics tech
Age: 38
In-game name:

 
#1 Posted at 2010-11-17 18:28        
     
hello i am needing some help with a script i am trying to make . what i am trying to do is when the weapon on the plane is selected it animates the weapon bays and the weapon type indicator. so if anyone can help i would be very greatful



here is the script.

_plane = _this select 0;
_weapon = weapon _plane;

while {(alive _plane)} do
 {

if ( _weapon "BWPH_M25_Launcher") then
   {
     _plane animate ["bomb_door_l", 1];
     _plane animate ["bomb_door_r", 1];
     _plane animate ["bselect", 1];
     _plane animate ["missile_hatch_l", 0];
     _plane animate ["missile_hatch_r", 0];
     _plane animate ["mselect", 0];
     _plane animate ["gselect", 0];
	 };
if (  _weapon "BWPH_AIM_35_Launcher") then
   {
     _plane animate ["bomb_door_l", 0];
     _plane animate ["bomb_door_r", 0];
     _plane animate ["bselect", 0];
     _plane animate ["missile_hatch_l", 1];
     _plane animate ["missile_hatch_r", 1];
     _plane animate ["mselect", 1];
     _plane animate ["gselect", 0];
   };
if (  _weapon "BWPH_M2_GG")then
  {
     _plane animate ["bomb_door_l", 0];
     _plane animate ["bomb_door_r", 0];
     _plane animate ["bselect", 0];
     _plane animate ["missile_hatch_l", 0];
     _plane animate ["missile_hatch_r", 0];
     _plane animate ["mselect", 0];
     _plane animate ["gselect", 1];
	};
	
sleep 1;

};

This post was edited by bwph4273 (2010-11-20 00:30, ago)

My Releases. BD-5J Micro Jet
My Projects. (wip) C-RAM , T-WALL

Author Message


Posts: 31
Rank:


Level: Member

Country: us
Location: tennessee
Occupation: industrial automation and robotics tech
Age: 38
In-game name:

 
#2 Posted at 2010-11-24 00:59        
     
ok ive been looking around an was wondering if i could use the cba_fnc_selectweapon. to make my script work and if so does anyone have any idea how to make this work . i am a complete noob when it comes to scripting.

My Releases. BD-5J Micro Jet
My Projects. (wip) C-RAM , T-WALL