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

Members Online

»
0 Active | 84 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 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: CoD 4 airstrikes
guedoe
General Member
Since: Sep 1, 2012
Posts: 18
Last: Jan 4, 2013
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Friday, Nov. 9, 2012 07:02 pm
Just wondering if anyone has ever tried setting up an airstrike to use this jet for this team and that jet for that team. I wish to use an F4 for allies and keep the mig29 for axis. I have tried editing the _hardpoints.gsc to which the game will load but n models show up for the fly by. Here is the code I tried. If you can see we also have a Stealth killstreak set up. Did I miss something here?
Code:
	// Spawn the planes
	plane = spawnplane( owner, "script_model", pathStart );
	if (isStealth==1)
	{
		plane setModel( "jokers_stealth" );
	}
	else if ( isStealth==0 )
	{
	    if ( owner == "allies" )
		{
		    plane setModel( "veh_jet_f4" );
		}
		else
		{
		    plane setModel( "vehicle_mig29_desert" );
		}
	}
	plane.angles = direction;
Share |
FzBr.d4rk
General Member
Since: Jan 23, 2011
Posts: 86
Last: Jun 7, 2016
[view latest posts]
Level 3
Category: CoD4 Scripting
Posted: Friday, Nov. 9, 2012 10:48 pm
You get no error?[confused]
Share |
guedoe
General Member
Since: Sep 1, 2012
Posts: 18
Last: Jan 4, 2013
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Friday, Nov. 9, 2012 11:33 pm
No errors, at all, just can't see any models. The cluster bombs still drop tho, lol. And you here the sounds. I'll run it again and see what the log file produces.
Share |
guedoe
General Member
Since: Sep 1, 2012
Posts: 18
Last: Jan 4, 2013
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Saturday, Nov. 10, 2012 12:08 am
I get these errors now.
Code:
******* script runtime error *******
pair 'entity' and 'allies' has unmatching types 'object' and 'string': (file 'maps/mp/gametypes/_hardpoints.gsc', line 678)
     if ( owner == "allies" )


Code:
******* script runtime error *******
model 'veh_jet_f4' not precached: (file 'maps/mp/gametypes/_hardpoints.gsc', line 680)
      plane setModel( "veh_jet_f4" );


Code:
******* script runtime error *******
cannot play fx on entity with no model: (file 'maps/mp/gametypes/_hardpoints.gsc', line 920)
 playfxontag( level.fx_airstrike_afterburner, self, "tag_engine_right" );
Share |
Ni3ls
General Member
Since: Nov 7, 2008
Posts: 256
Last: Sep 9, 2017
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Saturday, Nov. 10, 2012 06:39 am
Code:
******* script runtime error *******
pair 'entity' and 'allies' has unmatching types 'object' and 'string': (file 'maps/mp/gametypes/_hardpoints.gsc', line 678)
     if ( owner == "allies" )


if(owner.pers["team"] == "allies")

Code:
******* script runtime error *******
model 'veh_jet_f4' not precached: (file 'maps/mp/gametypes/_hardpoints.gsc', line 680)
      plane setModel( "veh_jet_f4" );


Precache the model preCacheModel("xmodel/veh_jet_f4");

Code:
******* script runtime error *******
cannot play fx on entity with no model: (file 'maps/mp/gametypes/_hardpoints.gsc', line 920)
 playfxontag( level.fx_airstrike_afterburner, self, "tag_engine_right" );


As the error says, this entity has no model
Share |
guedoe
General Member
Since: Sep 1, 2012
Posts: 18
Last: Jan 4, 2013
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Saturday, Nov. 10, 2012 02:49 pm
Awesome, much thanks for the help, I knew it was something simple I missed. The mig now shows up for the axis side but the f4 does not show up just yet. Changed
Code:
preCacheModel("xmodel/veh_jet_f4");
to
Code:
preCacheModel("veh_jet_f4");
and all the errors went away, however no f4 shows up just yet, again thanks for the help. :)
Share |
guedoe
General Member
Since: Sep 1, 2012
Posts: 18
Last: Jan 4, 2013
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Saturday, Nov. 10, 2012 04:20 pm
attachment: image(117.5Kb)
one more issue and I think it'll be fixed. The attached image will show you. 1. you can see the gap before playPlaneFx() but at 2 and 3 you can see some type of connection before playBombFx() and getBestPlaneDirection( hitpos ). You will have to see the image to know what I mean. This is causing several errors, however the map will still load and play, just kinda bugged.

Share |
Ni3ls
General Member
Since: Nov 7, 2008
Posts: 256
Last: Sep 9, 2017
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Saturday, Nov. 10, 2012 05:47 pm
I don't understand it. What's the error?
Share |
guedoe
General Member
Since: Sep 1, 2012
Posts: 18
Last: Jan 4, 2013
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Saturday, Nov. 10, 2012 06:13 pm
at the top you see no line on the far left side by the numbers between } and playPlaneFx(). If you look down at #2 and #3 marks, you can see a line between the } mark and the next line. The console_mp log file is showing lots of errors involving this area in the gsc file. It seems this line you see along with the + and - boxes is showing some type of connector and it should not be there in certain areas. I'm trying to explain the best I can, lol.

Code:
Error: bad syntax: (file 'maps/mp/gametypes/_hardpoints.gsc', line 939)
{
*


Share |
Ni3ls
General Member
Since: Nov 7, 2008
Posts: 256
Last: Sep 9, 2017
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Saturday, Nov. 10, 2012 06:53 pm
Yeah that's not difficult to fix. You have 4 { en 3 } so u miss 1 }.
Write it down under the line in the PlayPlaneFX()
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 Scripting

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

»