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 4
Category: CoD4 SP Mapping
CoD 4 mapping and level design for single player.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: How to get a tank's turret to fire
darkness_225
General Member
Since: Sep 2, 2009
Posts: 65
Last: Apr 30, 2013
[view latest posts]
Level 3
Category: CoD4 SP Mapping
Posted: Monday, Jun. 7, 2010 03:38 am
I can get tanks, for example a BMP, to fire its machine guns, but me and most other people can't get the main gun of a tank to fire. Can someone be a saint and post a script or something to get this working?
Share |
Chaos_Creator
General Member
Since: Oct 27, 2009
Posts: 25
Last: Jun 7, 2010
[view latest posts]
Level 1
Category: CoD4 SP Mapping
Posted: Monday, Jun. 7, 2010 01:41 pm
ok im quite sure that the tank in singleplayer only give the illusion of firing
theres scripting set up so that the tank rotates and theres an fx of it shooting and an fx of the explosion where it should hit pre-placed in the map.

i might need someone else to confirm all this but im quite sure thats how it works
Share |
tomv8
General Member
Since: Oct 5, 2008
Posts: 469
Last: Jul 14, 2010
[view latest posts]
Level 5
Category: CoD4 SP Mapping
Posted: Monday, Jun. 7, 2010 05:27 pm
Of coruse you can
get the turret to fire. have a look at my old topics. i got it figured out :)
Share |
darkness_225
General Member
Since: Sep 2, 2009
Posts: 65
Last: Apr 30, 2013
[view latest posts]
Level 3
Category: CoD4 SP Mapping
Posted: Tuesday, Jun. 8, 2010 12:58 am
tomv8 writes...
Quote:
Of coruse you can
get the turret to fire. have a look at my old topics. i got it figured out :)


Could you make a tutorial in the tuts section??
Share |
darkness_225
General Member
Since: Sep 2, 2009
Posts: 65
Last: Apr 30, 2013
[view latest posts]
Level 3
Category: CoD4 SP Mapping
Posted: Tuesday, Jun. 8, 2010 10:55 am
I actually got a M1A1 to target and destroy a BMP with its main gun, but the BMP is directly in front of it and the script (below) clearly tells it to fire upon it at a given area.

Code:
#include common_scripts\utility;

#include maps\_utility;


main()
{	
	maps\_m1a1::main( "vehicle_m1a1_abrams" );
	maps\_bmp::main( "vehicle_bmp_woodland" );
 	maps\_load::main();

	thread sequence_one();
	thread vehicle_setup();

}

vehicle_setup()
{
	wait 3;	

	level.abrams = getEnt( "abrams", "targetname" );
	level.abrams setVehWeapon( "m1a1_turret" );

	level.bmp = getEnt( "bmptarget", "targetname" );
	level.bmp setVehWeapon( "bmp_turret" );

	thread sequence_one();
}

sequence_one()
{
	while( 1 )
	{
		wait 0.05;

		node = ( 0, 704, 36 );

		distance = distance2d( level.abrams.origin, node ); 

		if( distance < 50 && level.bmp.health > 0)
		{
			//wait 2;

			level.abrams setTurretTargetEnt( level.bmp );

			wait 3;

			level.abrams fireWeapon();

			wait 200;

			level.bmp DoDamage( level.bmp.health + 9999, level.bmp.origin );
		}
		else if( distance < 50 && level.bmp.health == 0)

		break;
	}
}


I was looking at Blackout in Radiant, and the BM21s are firing at script_origins that linked in a certain order. I was thinking that if you link script_origins and the vehicle it would rotate it's turret and fire. Can someone confirm and if possible, post a script showing how to get a tank to target a certain area and fire?

edited on Jun. 8, 2010 06:55 am by sgt_roebuck
Share |
techno2sl
General Member
Since: Aug 5, 2004
Posts: 2977
Last: Oct 14, 2010
[view latest posts]
Level 9
Category: CoD4 SP Mapping
Posted: Tuesday, Jun. 8, 2010 11:44 am
Code:

vehiclename setturrettargetent(yourscriptorigin, yourscriptorigin.origin);

vehiclename fireTurret();



Note: Might be fireWeapon in cod4
Share |
darkness_225
General Member
Since: Sep 2, 2009
Posts: 65
Last: Apr 30, 2013
[view latest posts]
Level 3
Category: CoD4 SP Mapping
Posted: Tuesday, Jun. 8, 2010 02:07 pm
techno2sl writes...
Quote:
Code:

vehiclename setturrettargetent(yourscriptorigin, yourscriptorigin.origin);

vehiclename fireTurret();



Note: Might be fireWeapon in cod4


Can you post an example GSC using this function... I tried using but I'm pretty sure I misused it severly, I got so many errors.
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 SP 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

»