Tutorial Spawn Helicopters and Planes
#1
Hello

New tutorial, this time is about spawning a plane and a helicopter, Smile

First: Spawn a Plane

Code:
plane = spawnplane( owner, "script_model", origin, "allie compass icon", "enemy compass icon" );

An example:

Code:
jet = spawnplane( self, "script_model", self.origin, "compass_objpoint_airstrike_friendly", "compass_objpoint_airstrike_busy" );

Some functions:

Code:
jet setModel("vehicle_mig29_desert"); //for model, a jet example jet.angles = (pitch,yaw,roll); //for angles jet EnableLinkTo(); //to be possible to link to it jet MoveTo(position, time); //to move it jet RotateTo((pitch,yaw,roll),time); //to rotate it

Second: Spawn a Helicopter, it uses different commands.(vehicle commands)

Code:
heli = spawnHelicopter( owner, position, angles, "heli type", "heli model" );

An example(chopper gunner):

Code:
heli = spawnHelicopter( self, self.origin+(0,0,150), self.angles, "cobra_minigun_mp", "vehicle_mi-28_mp" );

Some functions:

Code:
heli Vehicle_SetSpeed(200,100); //modify heli speed heli SetTurningAbility(1); //make it take new angles heli SetMaxPitchRoll(30,20); //max Pitch and Max Roll angles heli setVehWeapon("cobra_player_minigun_mp"); //set vehicle weapon heli setVehGoalPos(position,1); //set goal, for moving it heli maps\mp\killstreaks\_helicopter::addToHeliList(); //add to heli list and make it consume air space

There are many more commands and things you can use, but thats your part, Wink

Thanks for reading. Nyan Cat
Reply

#2
can you exlplain how to let if follow you?
cuz i cant get it working
well i can but it will be a fucking long code of keep wait 1; heli self origin
Reply

#3
OMA

Code:
while( 1 ) { heli setVehGoalPos( self.origin + ( 0, 0, 500 ), 1 ); wait 1; }
Reply

#4
thanks,
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation [Request] Random Weapon At Spawn Scripts18 3 6,804 07-27-2013, 23:53
Last Post: DidUknowiPwn
  Help Spawn Message Playing on Respawn? Killjoy 7 7,340 07-11-2013, 14:53
Last Post: Killjoy
  [Release] Spawn Polygons and Pyramids Yamato 6 6,705 06-20-2013, 12:30
Last Post: Yamato
  Question on how to "Spawn" a flying rocket as a player? akillj 8 8,505 06-04-2013, 01:54
Last Post: rotceh_dnih
  Help pickup mod + spawn fx m4gicaL 1 3,709 03-07-2013, 17:52
Last Post: tadej
  Help No more free spawn influencers! JustDoingThisShit 0 5,794 02-03-2013, 20:21
Last Post: JustDoingThisShit
  W@W: Making player spawn with a custom default class. koil 9 7,546 01-13-2013, 12:10
Last Post: koil
  spawn object SaviouR9966 3 4,058 01-08-2013, 14:31
Last Post: 99IRock
  Help Spawn on predefined points problem islamsaab 2 3,921 09-29-2012, 21:23
Last Post: islamsaab
  Help Spawn Weapon Models Ich1994 3 4,648 07-15-2012, 14:20
Last Post: archit

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.