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

Members Online

»
0 Active | 62 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 2
Category: CoD2 MP Mapping
CoD 2 mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Plane with fire behind
haggis
General Member
Since: Apr 26, 2006
Posts: 109
Last: Mar 8, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Wednesday, May. 23, 2007 07:03 pm
Hey all,

Is it possible that my flying plane get some fire behind his tale so that it looks like he is crashing?? '

This is the .gsc for my plane:

Code:
main()
{

level thread planes();

}
//vliegtuigen

	planes()
	{
	level.PlaneSpeed = 10.0;

	vliegtuig = getent ("vliegtuig","targetname");

	temp = getent (vliegtuig.target,"targetname");
	vliegtuig.dest = temp.origin;
	vliegtuig.start = vliegtuig.origin;
	vliegtuig hide();

	wait 60;


	vliegtuig thread plane_flyby("vliegtuig_flyby");
	wait 10;

	}


	plane_flyby(sound)
	{
	if (isdefined (sound))
	self playsound ("bomberflyby");

	self show();

	self moveto(self.dest, level.PlaneSpeed);

	wait 4;
	self rotateroll (-360,1);

	wait 2;
	self rotateroll (-450,1.25);
	
	
	
	wait level.PlaneSpeed;

	
	
	}


greetz,

Haggis
Share |
Derix
General Member
Since: Mar 24, 2005
Posts: 133
Last: Sep 8, 2009
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Wednesday, May. 23, 2007 07:30 pm
Maybe you can use this:

Code:
playfxontag ( <effect id >, <entity>, <tag name> )


or

linkto( <linkto entity>, <tag>, <originOffset>, <anglesOffset> )


But then you will need an extra entity I think.


edited on May. 23, 2007 03:31 pm by Derix
Share |
haggis
General Member
Since: Apr 26, 2006
Posts: 109
Last: Mar 8, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Wednesday, May. 23, 2007 08:49 pm
Ok, I've got this now:

Code:
planes()
	{
	level.PlaneSpeed = 10.0;

	vliegtuig = getent ("vliegtuig","targetname");

	temp = getent (vliegtuig.target,"targetname");
	vliegtuig.dest = temp.origin;
	vliegtuig.start = vliegtuig.origin;
	vliegtuig hide();
	playfxontag (ground_fire_med,vliegtuig,tagname);

	wait 60;


	vliegtuig thread plane_flyby("vliegtuig_flyby");
	wait 10;

	}


It's getting an error by:

Code:
******* script compile error *******
uninitialised variable 'tagname': (file 'maps/mp/mp_forest_1_planes.gsc', line 19)
 playfxontag (ground_fire_med,vliegtuig,tagname);
                                                          *


edited on May. 23, 2007 04:50 pm by haggis
Share |
OLD_MAN_WITH_GUN
General Member
Since: May 13, 2006
Posts: 754
Last: Jan 23, 2010
[view latest posts]
Level 7
Category: CoD2 MP Mapping
Posted: Wednesday, May. 23, 2007 09:31 pm
For < tag name > you have to enter one of the models tags.

The tags of the stuka and the spitfire:
tag_rotator, tag_bigbomb, tag_engine_left, tag_engine_right, tag_gunleft, tag_gunright tag_prop, tag_smallbomb01left, tag_smallbomb01right, tag_smallbomb02left, tag_smallbomb02right, tag_wingtipl and tag_wingtipr.

The tags of the p51 mustang:
tag_origin, tag_prop

Example:
playfxontag (level._effect["ground_fire_med"],vliegtuig,"tag_engine_left");

So the effect "ground_fire_med" (which have to be defined in your mp_yourmapname_fx.gsc) will be played at your plane "vliegtuig" at it's tag "tag_engine_left". But the effect will only played ones (which can be very short). So you have to create a longer playing effect or you have to loop it by yourself.
Share |
haggis
General Member
Since: Apr 26, 2006
Posts: 109
Last: Mar 8, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Thursday, May. 24, 2007 08:39 am
Where in the .gsc must I put that code[confused]
And how can I loop the fx??


greetz,

Haggis

edited on May. 24, 2007 04:39 am by haggis
Share |
OLD_MAN_WITH_GUN
General Member
Since: May 13, 2006
Posts: 754
Last: Jan 23, 2010
[view latest posts]
Level 7
Category: CoD2 MP Mapping
Posted: Thursday, May. 24, 2007 02:32 pm
Add the following lines at the end of your gsc file.
Code:
fire()
{
	while(1)
	{
		while(level.plane_fire)
		{
			playfxontag(level._effect["ground_fire_med"], self, "tag_engine_left" );
			wait .1;
		}
		wait 0.01;
	}
}

Then, under the line vliegtuig hide(); remove the line
playfxontag (ground_fire_med,vliegtuig,tagname);
and add the following two lines there.
level.plane_fire = false;
vliegtuig thread fire();

At the beginning of the function plane_flyby(); (under the line, which will show the plane) add the line
level.plane_fire = true;
and at the end of this function (before you hide the plane again) add the line
level.plane_fire = false;
So the fire effect will start until your plane becomes visible, loops every 0.1 sec. and stops short before the plane becomes invisible again.
Share |
haggis
General Member
Since: Apr 26, 2006
Posts: 109
Last: Mar 8, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Thursday, May. 24, 2007 04:44 pm
Hey all,

This is my code now, and the map is loading good. But when the plane must come over (1 minute) it gave's an error on line 23 (wait 60) and then cod2 crashes. What's wrong with the script?

Code:
main()
{

level thread planes();

}
//vliegtuigen

	planes()
	{
	level.PlaneSpeed = 4.0;

	vliegtuig = getent ("vliegtuig","targetname");

	temp = getent (vliegtuig.target,"targetname");
	vliegtuig.dest = temp.origin;
	vliegtuig.start = vliegtuig.origin;
	vliegtuig hide();
	level.plane_fire = false;
	vliegtuig thread fire();


	wait 60;


	vliegtuig thread plane_flyby("vliegtuig_flyby");
	wait 10;

	}


	plane_flyby(sound)
	{
	if (isdefined (sound))
	self playsound ("bomberflyby");

	self show();
	level.plane_fire = true;

	self moveto(self.dest, level.PlaneSpeed);

	wait 4;
	self rotateroll (-360,1);
	
	
	
	wait level.PlaneSpeed;
	
	level.plane_fire = false;
	self hide();
	self.origin = self.start;


	
	
	}

	fire()
	{
	while(1)
	{
	while(level.plane_fire)
	{
	playfxontag(level._effect["ground_fire_med"],self, "tag_engine_left" );
	wait .1;
	}
	wait 0.01;
	}
	}
Share |
OLD_MAN_WITH_GUN
General Member
Since: May 13, 2006
Posts: 754
Last: Jan 23, 2010
[view latest posts]
Level 7
Category: CoD2 MP Mapping
Posted: Thursday, May. 24, 2007 06:00 pm
haggis writes...
Quote:
it gave's an error on line 23 (wait 60) and then cod2 crashes. What's wrong with the script?
Please post the whole error message.

And you have to create a *_fx.gsc file where you precache the effects you want to use in your map.

So create a new text file in the folder maps/mp and name it mp_yourmapname_fx.gsc (where 'yourmapname' is the name of your map).
Add in the following.
Code:
main()
{
	precacheFX();

}

precacheFX()
{
	level._effect["ground_fire_med"] = loadfx ("fx/fire/ground_fire_med.efx");
}

So the effect ground_fire_med is precached for use.

Add this line to your mp_yourmapname.gsc above the line maps\mp\_load::main();
maps\mp\mp_yourmapname_fx::main();
so your new *_fx.gsc file will be called.
Share |
haggis
General Member
Since: Apr 26, 2006
Posts: 109
Last: Mar 8, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Thursday, May. 24, 2007 07:20 pm
I can't see more of the error, because cod2 is crashing when I want to open te console. (And now I only get a black screen and then It gives a report that cod2 had crashed and it get back to windows)

This is my plane.gsc:

Code:
main()
{

level thread planes();

}
//vliegtuigen

	planes()
	{
	level.PlaneSpeed = 4.0;

	vliegtuig = getent ("vliegtuig","targetname");

	temp = getent (vliegtuig.target,"targetname");
	vliegtuig.dest = temp.origin;
	vliegtuig.start = vliegtuig.origin;
	vliegtuig hide();
	level.plane_fire = false;
	


	wait 60;

	vliegtuig thread plane_flyby("vliegtuig_flyby");
	vliegtuig thread fire();
	level.plane_fire = false;
	
	wait 10;

	}


	plane_flyby(sound)
	{
	if (isdefined (sound))
	self playsound ("bomberflyby");

	self show();
	level.plane_fire = true;

	self moveto(self.dest, level.PlaneSpeed);

	wait 4;
	self rotateroll (-360,1);
	
	
	
	wait level.PlaneSpeed;
	
	level.plane_fire = false;
	self hide();
	self.origin = self.start;


	
	
	}

	fire()
	{
	while(1)
	{
	while(level.plane_fire)
	{
	playfxontag(level._effect["ground_fire_med"],self, "tag_engine_left" );
	wait .1;
	}
	wait 0.01;
	}
	}


And this is my fx.gsc:

Code:
main()
{
precacheFX();
ambientFX();
level thread spawnWorldFX();

level.scr_sound["flak88_explode"] = "flak88_explode";
level.scr_sound["weap_pickup"] = "weap_pickup";

}
precacheFX()
{
level._effect["flak_explosion"] = loadfx("fx/explosions/flak88_explosion.efx");
level._effect["ground_fire_med"] = loadfx ("fx/fire/ground_fire_med.efx");
level._effect["thin_light_smoke_S"] = loadfx ("fx/smoke/thin_light_smoke_S.efx");
}

ambientFX()
{
}



spawnWorldFX()
{
//fire
maps\mp\_fx::loopfx("ground_fire_med", (-110,110,-12), 2);

//smoke 
maps\mp\_fx::loopfx("thin_light_smoke_S", (-110,110,-4), 0.7);
}


edited on May. 24, 2007 03:21 pm by haggis

edited on May. 24, 2007 03:25 pm by haggis
Share |
haggis
General Member
Since: Apr 26, 2006
Posts: 109
Last: Mar 8, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Thursday, May. 24, 2007 07:41 pm
Problem solved[thumbs_up]

Thank you very much Old_Man[rocking]

I got script_vehicle for my plane, not script_model

greetz,

haggis
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 MP 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

»