Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 73 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty
Category: CoD Mapping
CoD mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Flyable Plane [script release] by ebusiangamers
ebusanta001
General Member
Since: Mar 3, 2013
Posts: 195
Last: Aug 25, 2020
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoD Mapping
Posted: Tuesday, Mar. 25, 2014 03:18 pm
//Flyable planes in CoD
First of all, you need to figure in your head the concept of a “flyable plane” in CoD. The term “flyable plane” is used to describe the capacity of controlling a model, which mean the player will be linked to the plane model, and the plane model follows the direction given by the player.

• Before controlling a plane, you need to save your current settings, such as position, health, weapons,..

Code:
oldpos = self.origin;
oldhealth = self.health;
self save_weapons();:


• Now you will spawn a plane model on some place far from players sight

plane = spawn(“script_model”, oldpos + (5000, 5000, 1100);

• Set a model for your plane

Code:
plane setModel(“xmodel/vehicle_plane_stuka”);


Note: if you set a different model which isn’t from original CoD, you need to precache it first
precacheModel(“xmodel/your_custom_model”);

• Now it’s the most challenging step. Controlling means “following my angles, but move forward”, so what you need it’s making some references:

Code:
angles = self.angles //Your angle
vector = anglestoforward(angles) //Convert your angles into a vector.
vector = vectorScale(vector, 500) //Convert your vector to an unit.
target = harrier.origin + vector; //Calculate the position to go to with the converted unit


• Let’s make the movement realistic
Code:
h_angles = vectortoangles(target - harrier.origin);
harrier rotateto(h_angles, 1) // The plane rotate to the target position<br />
<br />
//Make it move with realistic speed
distance = distance(target, harrier.origin);
harrier moveto(target, time) // the plane go to the target position


Here is my custom functions I used in the tutorial

Code:
save_weapons()
{
	self saveGunnerWeaponSlot("primary");
	self saveGunnerWeaponSlot("primaryb");
	self saveGunnerWeaponSlot("pistol");
	self saveGunnerWeaponSlot("grenade");
	self saveGunnerWeaponSlot("smokegrenade");
	
	//For UO
	//self saveGunnerWeaponSlot("satchel");
	//self saveGunnerWeaponSlot("binocular");
}


Code:
vectorScale(vec, scale)
{
	vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
	return vec;
}


Basically, you are done. Feel free to customize the next part of it. Put some credit if you distribute this tutorial to orthers.

================================= If you are interested at making mod, here is one of your chances. Contact me (ebusanta001@hotmail.com) if you want to be a part of this mod: http://www.moddb.com/mods/star-wars-mod-the-rebellion-warfare
Share |
Donefore
General Member
Since: May 1, 2009
Posts: 165
Last: Sep 20, 2018
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoD Mapping
Posted: Tuesday, Mar. 25, 2014 11:05 pm
attachment: application(357.4Kb)
heres a mod that you can fly planes COD UO

Not Bad
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty : CoD Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»