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

Members Online

»
0 Active | 9 Guests
Online:

LATEST FORUM THREADS

»
Kharkov xmodels
CoD+UO General
Node is floating???
CoD4 SP Mapping
new scripter cod4
CoD4 Scripting
[Release]SP East Prussian ...
CoD2 Map + Mod Releases

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, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: Stinger Missile
Hyperwolf932
General Member
Since: Dec 13, 2011
Posts: 14
Last: Sep 23, 2012
[view latest posts]
Level 1
Category: CoD4 SP Mapping
Posted: Tuesday, Dec. 13, 2011 10:47 pm
Hello,

I made a map, That a Loyalist Piloting a Blackhawk and you have to get inside but a stinger shoot's down the Helicopter, But I got a problem, I don't know how to make a Stinger fire into the Helicopter, Just like in the level "Hunted" in the intro, A Stinger Missile come's out of a Farm house and fly's straight to the blackhawk, even "Shock And Awe" where the Pilot Callsign "Deadly" Get's shot by a Stinger Missile.

What im saying is "I do not know how to spawn a Stinger Missile to fire into the Helicopter triggered by a Trigger_Once."

[banghead]

edited on Dec. 13, 2011 10:49 pm by Hyperwolf932
Share |
serthy
General Member
Since: Sep 8, 2010
Posts: 480
Last: Apr 15, 2013
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD4 SP Mapping
Posted: Wednesday, Dec. 14, 2011 04:52 am
maybe something like:
Code:
// stinger = shootMissile( "stinger" , getent( "stinger_start" , "targetname" ) , level.blackhawk , undefined , getent( "stinger_trigger" , "targetname" ) );

shootMissile( weapon , startPos , targetEnt , owner , trigger , offset )
{
	if( isDefined( trigger ) )
		trigger waittill( "trigger" );

	if( !isDefined( offset ) )
		offset = ( 0 , 0 , 0 );

	if( isDefined( owner ) )
		missile = magicBullet( weapon , startPos , targetEnt.origin , owner );
	else
		missile = magicBullet( weapon , startPos , targetEnt.origin );

	missile Missile_SetTarget( targetEnt , offset );

	return missile;
}
Share |
Hyperwolf932
General Member
Since: Dec 13, 2011
Posts: 14
Last: Sep 23, 2012
[view latest posts]
Level 1
Category: CoD4 SP Mapping
Posted: Wednesday, Dec. 14, 2011 11:23 am
serthy writes...
Quote:
maybe something like:
Code:
// stinger = shootMissile( "stinger" , getent( "stinger_start" , "targetname" ) , level.blackhawk , undefined , getent( "stinger_trigger" , "targetname" ) );

shootMissile( weapon , startPos , targetEnt , owner , trigger , offset )
{
	if( isDefined( trigger ) )
		trigger waittill( "trigger" );

	if( !isDefined( offset ) )
		offset = ( 0 , 0 , 0 );

	if( isDefined( owner ) )
		missile = magicBullet( weapon , startPos , targetEnt.origin , owner );
	else
		missile = magicBullet( weapon , startPos , targetEnt.origin );

	missile Missile_SetTarget( targetEnt , offset );

	return missile;
}




Ok,

So how do I set it up?, I don't really know how to use codes, ok so "stinger_trigger" is the Trigger targetname?
and
"level.blackhawk" blackhawk is the targetname for the
blackhawk?

and script_origin targetname "stinger_start"

Am I correct?

[confused]
Share |
serthy
General Member
Since: Sep 8, 2010
Posts: 480
Last: Apr 15, 2013
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD4 SP Mapping
Posted: Wednesday, Dec. 14, 2011 11:59 am
i dont know if this will work, im not into cod4 & sp stuff

but if this works, then:

- place a script_origin on the startpoint ( key: targetname value: stinger_start )
- define your blackhawk ( i dont know how this is done , i call it "level.blackhawk" in here ) in your script
- if you want to start the stinger-missile with a trigger, place a trigger ( key: targetname value: stinger_trigger ) in the map ( the script will wait untill the trigger is triggered if you define one )
- else you call the shootMissile()-function to shoot the stinger immediately
-if you define an offset, the missile will fly to this offsetpoint next to your target


Code:
stinger = shootMissile( "stinger" , getent( "stinger_start" , "targetname" ) , level.blackhawk , undefined , getent( "stinger_trigger" , "targetname" ) );


and place somewhere else in your gsc the shootMissile()-function

try it out on a small testmap to see if it works
Share |
Hyperwolf932
General Member
Since: Dec 13, 2011
Posts: 14
Last: Sep 23, 2012
[view latest posts]
Level 1
Category: CoD4 SP Mapping
Posted: Wednesday, Dec. 14, 2011 12:39 pm
serthy writes...
Quote:
i dont know if this will work, im not into cod4 & sp stuff

but if this works, then:

- place a script_origin on the startpoint ( key: targetname value: stinger_start )
- define your blackhawk ( i dont know how this is done , i call it "level.blackhawk" in here ) in your script
- if you want to start the stinger-missile with a trigger, place a trigger ( key: targetname value: stinger_trigger ) in the map ( the script will wait untill the trigger is triggered if you define one )
- else you call the shootMissile()-function to shoot the stinger immediately
-if you define an offset, the missile will fly to this offsetpoint next to your target


Code:
stinger = shootMissile( "stinger" , getent( "stinger_start" , "targetname" ) , level.blackhawk , undefined , getent( "stinger_trigger" , "targetname" ) );


and place somewhere else in your gsc the shootMissile()-function



try it out on a small testmap to see if it works



I tried and it did notn work =\
Any more bright ideas?..



[sad]
Share |
FzBr.Dark
General Member
Since: Jan 23, 2011
Posts: 78
Last: Jun 8, 2013
[view latest posts]
Level 3
Im a fan of MODSonair
Category: CoD4 SP Mapping
Posted: Thursday, Mar. 22, 2012 11:08 pm
attachment: application(4.0Kb)
take a look this map.
the scripts are from the "Hunted".
Share |
Hyperwolf932
General Member
Since: Dec 13, 2011
Posts: 14
Last: Sep 23, 2012
[view latest posts]
Level 1
Category: CoD4 SP Mapping
Posted: Friday, Sep. 21, 2012 10:49 pm
DarkShark writes...
Quote:
take a look this map.
the scripts are from the "Hunted".


After mapping in COD2 and learning about GSC that did the trick. Thanks.
Share |
Restricted Access Restricted Access subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 SP Mapping

Latest Syndicated News

»
Codutility is for sale!
Seems like a plan to save Codutility ..Quote:Well guys I heard what you said...
Codutility is for sale!
Well as modding dies, so does the sites that support it.. Its a sad sad day,...
Codutility is for sale!
Quote:Codutility is for sale! Yes, you read well. Codutility ( sites/do...
Why console gaming is dying
Quote:Consider this: Dedicated gaming sales — including living-room consoles...
Devs: Games are being dumb...
Click 'read more' to view the contents of this post.

Partners & Friends

»