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

Members Online

»
0 Active | 4 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

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+UO General
General game questions, comments, and chat.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Additional Fighters AWE 2.12
general99
General Member
Since: Oct 31, 2004
Posts: 323
Last: Dec 18, 2013
[view latest posts]
Level 5
Category: CoD+UO General
Posted: Monday, Jul. 6, 2009 06:13 pm
I like the "eye candy" effects of the stuka flyovers in AWE 2.12

It occurred that there were a few other aircraft models in UO, and wondered how hard it would be to add some other models to vary the scenery. Remarkably easy, as it turned out. I'm a complete n00b at scripting, so no doubt clever folks could have done it neater - but hey!! it works!!

I added Spitfires, P47 and ME109 flovers.

Step 1. Alter the _awe.gsc
Find the precaching() routine, and add the extra models.
Code:

	// Precache stukas
	if(level.awe_stukas)
		awePrecacheModel("xmodel/vehicle_plane_stuka");
		awePrecacheModel("xmodel/v_br_air_spitfire");
		awePrecacheModel("xmodel/v_us_air_p47");
		awePrecacheModel("xmodel/v_ge_air_me-109");

Find the stukas() routine. I added the second line to act as a switch to choose the various plane models, and the planetype parameter to the last line to be passed to the next routine.
Code:

		angle = 90 * randomInt(4);
		planetype = randomInt(4);		//switch for type of plane - do it here so not mixed plane types
		for(i=0;i<stukas;i++)
			thread stuka( offset - (stukas * 500) + (i * 1000), angle, planetype);


Add the planetype parameter to this line:-
Code:

stuka(offset, angle, planetype)


Then changed this bit. The last two models, I got a bit adventurous and varied the sound files.

Code:

	if(!(randomInt(100) < level.awe_stukascrash))
//add other planes
	{
	
		
		switch (planetype)				
		{
			case 0:
				// spawn spitfire
				stuka = spawn_model("xmodel/v_br_air_spitfire", "stuka", startpos, ( 10, angle, 0) );
				wait 0.05;

				// play sound
				stuka playloopsound("spitfire_loop");
				break;						
			case 1:					
				// spawn stuka
				stuka = spawn_model("xmodel/vehicle_plane_stuka", "stuka", startpos, ( 10, angle, 0) );
				wait 0.05;

				// play sound
				stuka playloopsound("awe_stukaloop");
				break;
			case 2:					
				// spawn p47
				stuka = spawn_model("xmodel/v_us_air_p47", "stuka", startpos, ( 10, angle, 0) );
				wait 0.05;

				// play sound
				snd_variation = randomInt(2);	
				switch (snd_variation)
				{
					case 0:
						stuka playloopsound("p47_loop1");
						break;
					case 1:
						stuka playloopsound("p47_loop2");
						break;
				}
				break;
			case 3:					
				// ME109
				stuka = spawn_model("xmodel/v_ge_air_me-109", "stuka", startpos, ( 10, angle, 0) );
				wait 0.05;

				// play sound
				snd_variation = randomInt(2);	
				switch (snd_variation)
				{
					case 0:
						stuka playloopsound("me109_loop1");
						break;
					case 1:
						stuka playloopsound("me109_loop2");
						break;
				}
				break;
		}


Then to get the sounds in, I modified dialog_mp.csv
Code:

#Stukas												

awe_stukaloop		vehicles/stuka_by_new01.wav	1	1.2	1.1	1.4	2500	0	auto			looping
awe_stukahit		vehicles/stuka_hit.wav	1.25	1.35	0.95	1.05	3000	0	auto			looping
spitfire_loop		vehicles/spit_flyover01.wav	1	1.2	1.1	1.4	2500	0	auto			looping
p47_loop1		vehicles/bf109_attack03c.wav	1	1.2	1.1	1.4	2500	0	auto			looping
p47_loop2		vehicles/bf109_attack02b.wav	1	1.2	1.1	1.4	2500	0	auto			looping
me109_loop1		vehicles/bf109_attack01a.wav	1	1.2	1.25	1.4	2500	0	auto			looping
me109_loop2		vehicles/bf109_attack02a.wav	1	1.2	1.25	1.4	2500	0	auto			looping


Done!!



edited on Jul. 6, 2009 02:18 pm by general99
Share |
general99
General Member
Since: Oct 31, 2004
Posts: 323
Last: Dec 18, 2013
[view latest posts]
Level 5
Category: CoD+UO General
Posted: Monday, Jul. 6, 2009 06:23 pm
Hmm, the second code box above doesn't seem to display properly:-

angle = 90 * randomInt(4);
planetype = randomInt(4); //switch for type of plane - do it here so not mixed plane types
for(i=0;i thread stuka( offset - (stukas * 500) + (i * 1000), angle, planetype);


It's the third line that screws up - it's an original line so leave that one as it is standard

edited on Jul. 6, 2009 02:24 pm by general99
Share |
general99
General Member
Since: Oct 31, 2004
Posts: 323
Last: Dec 18, 2013
[view latest posts]
Level 5
Category: CoD+UO General
Posted: Thursday, Jul. 9, 2009 11:29 am
Lol. I chucked the B-17 in as well. I'll have to fiddle a bit to either restrict it to a single plane, or space the three models out a bit. It's a bit much when such a big plane does a barrel roll also!!

Anybody know whether I could attach a smoke effect to these models to make it look like a damaged bomber limping home?

There is also a Condor model in VCod and a Heinkel 111, and a Russian fighter amongst the stock models.
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty : CoD+UO General

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

»