| Author |
Topic: Stinger Missile |
| Hyperwolf932 |
 |
General Member Since: Dec 13, 2011 Posts: 14 Last: Sep 23, 2012 [view latest posts] |
|
|
|
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."
edited on Dec. 13, 2011 10:49 pm by Hyperwolf932 |
 |
|
|
| serthy |
General Member Since: Sep 8, 2010 Posts: 480 Last: Apr 15, 2013 [view latest posts] |
|
|
 |
|
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;
}
|
|
|
|
| Hyperwolf932 |
 |
General Member Since: Dec 13, 2011 Posts: 14 Last: Sep 23, 2012 [view latest posts] |
|
|
|
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]](images/BBCode/smilies/confused.gif) |
 |
|
|
| serthy |
General Member Since: Sep 8, 2010 Posts: 480 Last: Apr 15, 2013 [view latest posts] |
|
|
 |
|
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 |
|
|
|
| Hyperwolf932 |
 |
General Member Since: Dec 13, 2011 Posts: 14 Last: Sep 23, 2012 [view latest posts] |
|
|
|
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]](images/BBCode/smilies/sad.gif) |
 |
|
|
| FzBr.Dark |
 |
General Member Since: Jan 23, 2011 Posts: 78 Last: Jun 8, 2013 [view latest posts] |
|
|
 |
|
|
| Hyperwolf932 |
 |
General Member Since: Dec 13, 2011 Posts: 14 Last: Sep 23, 2012 [view latest posts] |
|
|
|
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. |
 |
|
|
|
|
FactoryCall of Duty 2: Maps: Multiplayer (12.42Mb)
TrenchesCall of Duty 2: Maps: Multiplayer (8.44Mb)
The MarshCall of Duty 2: Maps: Multiplayer (4.78Mb)
ScrapyardCall of Duty 2: Maps: Multiplayer (2.62Mb)
|