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

Members Online

»
0 Active | 78 Guests
Online:

LATEST FORUM THREADS

»
Using Teamspeak
Teamspeak Servers
map loading error
CoD2 MP 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
Page
Previous Page
subscribe
Author Topic: (Hind) Enemy Helicopter strafe run
SPi
General Member
Since: Jul 4, 2012
Posts: 530
Last: Oct 17, 2018
[view latest posts]
Level 6
Category: CoD4 SP Mapping
Posted: Monday, Sep. 10, 2012 12:53 am
ill keep all that in mind but i for now lets try to make the chopper spawn and get from position A to B and delete itself after that. Thats all i want for now. Is there a simple and a good way you guys can give me?
[banghead] [tongue]
Share |
SPi
General Member
Since: Jul 4, 2012
Posts: 530
Last: Oct 17, 2018
[view latest posts]
Level 6
Category: CoD4 SP Mapping
Posted: Monday, Sep. 10, 2012 01:43 am
Ive managed to do that. the chopper now spawns move and gets from A to B and stops. thats all i want for now . Thanx to the "?s" in the SHIFT+V window. and your help.
Share |
superpanos2
General Member
Since: Sep 1, 2011
Posts: 6
Last: Sep 26, 2013
[view latest posts]
Level 0
Category: CoD4 SP Mapping
Posted: Saturday, Sep. 29, 2012 07:18 am
sam_fisher3000 writes...
Quote:
SPi writes...
Quote:
OK. thanx for that. I know how to connect the vehiclenodes and vehnodes rotate (these I use for the helicopter) and i gave the targetnames the tut showed. But the tut was for a ground vehicle so there are some differences.
I had already gave the vehicletype and based on that the error showed up i guess. Cos when that Key/value did not exist there was an error with a null missing or somethink.(Just saying).

*Did you follow the basic tutorial on how to spawn vehicles?*

Is there a tut on how to spawn vehicles?I spawn them same way as actors.If wrong tell me.

the keys values of the hind (script/vehicle) are on the uploaded image.

I have set the hind speed 30-40
and set lookahead 1


Thats all for now. Let me know If somethink is wrong


Spawning vehicle is not the same as spawning AI. Vehicle has more aspects or KV to insert and the trigger is a little different. I never set speed on the hind or lookahead. It's always a vehicle node KV and mainly works for ground vehicles. If you say it works, then it works.

As for the shooting, that script 3st0nian give is short and concise, though I don't use it. I used part of it especially the last part, fire missile to specify the number of shots but there's an error when the vehicle dies or deleted b/c the vehicle no longer exist and you'll get constant errors.

So I stick to the script that I used so the whole shooting stops when the helicopter dies. And I just script one of the script_origin and use vehicledetachfrompath(); so whenever the helicopter gets to that path or node, it stops and you can let it shoot. Or you can use script_stopnode/1

Here's an alternative to shooting, though more complex but it gives a bit more flexibility. The script that was posted seemed to target one origin or struct but here you can have an array of targets. Though I am pretty sure you can target multiple targets with the script already posted. And you can have more functions for the one I used.

Example:

chopper thread abrams_targets_stuff(); // - done mind the name

Code:
heli_fight() //not needed for helicopters but for ground vehicles - good to have reference 
{
	level.enhelik = self;
	self.ignoreme = true; //no need
	self.IgnoreRandomBulletDamage = true; //no need
	self waittill( "goal" );
	
	self.a.rockets = 5000;
	if ( isalive( level.enhelik ) )
	{
		self setentitytarget( level.enhelik );
		attractor = Missile_CreateAttractorOrigin( level.enhelik.origin + ( 0, 0, 0 ), 5000, 500 );
		
		
		//add_wait( ::_wait, 30 );
		//do_wait_any();
	
		if ( isalive( level.enhelik ) )
			radiusdamage( level.enhelik.origin, 250, 5000, 2500 );

		Missile_DeleteAttractor( attractor );
	}
	
	
}

abrams_targets_stuff() //main one - dont mind the name 
{
	level.enhelik endon( "death" ); //stops when dead
	level.timer = gettime();
	wait( 0.1 );
	targets = getentarray( "tathere", "targetname" ); //targets
	
	level.enhelik thread abrams_aims_at_targets();
	wait( 1.2 );
for ( ;; )
	{
		shots = randomintrange( 4, 7 );
		for ( i = 0; i < shots; i++ )
		{
			self SetVehWeapon( "hind_FFAR" ); //set weapons
			//self SetVehWeapon( "cobra_Sidewinder");
			self fireWeapon();
			wait( 2.1 );
		}
		wait( randomfloatrange( 2, 4 ) );
	}
	
}

abrams_aims_at_targets()
{
	level.enhelik endon( "death" ); //same
	targets = getentarray( "tathere", "targetname" );
	for ( ;; )
	{
		for ( i = 0; i < targets.size; i++ )
		{
			self setturrettargetent( targets[ i ] );
			self waittill( "turret_on_target" );
			wait( randomfloat( 6, 10 ) );
		}
	}
	
}


The code I used is the exact same as the source files released for the m1a1 tank shoot. Mostly, but for helicopter, it's best to specify the weapon type. Any weapon can be used. I tried cannon, turret, missiles, sidewinder, FFAR, etc. And more flexibility like mentioned.

Hope this helps.


What does level.enhelik stand for?
And on what do you call the function? I mean , what's the self entity?
Share |
sam_fisher3000
General Member
Since: Apr 18, 2007
Posts: 816
Last: Jul 15, 2016
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoD4 SP Mapping
Posted: Saturday, Sep. 29, 2012 08:37 am
Level.enhelik is what I defined for the helicopter. It's the name. And it is a self entity, hence, level.enheli = self.

Though, I had to specify level.enhelik before in another thread. I missed this part, though it should be pretty obvious.

It's just level.enhelik = getent("enhelik","targetname");

I just define it like you would for any entities. You still having problem?

There's other ways of shooting. I have another format or coding for script. It's all experimental anyways, play around with the different shooting function/codes and they all work.
Share |
Restricted Access Topic is Locked
Page
Previous Page
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

»