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

Members Online

»
0 Active | 40 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
Page
Next Page
subscribe
Author Topic: Solved: Getting the Javelin to work
feilong80
General Member
Since: Aug 30, 2008
Posts: 14
Last: Mar 2, 2009
[view latest posts]
Level 1
Category: CoD4 SP Mapping
Posted: Saturday, Feb. 28, 2009 11:30 pm
Ok superfriends,

I have the javelin anti-tank gun working. The scripting is pretty darn simple. The real issue is the materials required for the zone file- which of course are not automatically suggested like all the other assets, so it took a bit of hunting to find them.

Here's the code:

Code:

//set up teh jav target
tank = getent("auto64", "targetname"); 
OFFSET = ( 0, 0, 60 );
target_set( tank, OFFSET );
target_setAttackMode( tank, "top" ); //not quite sure what this does. -RTH
target_setJavelinOnly( tank, true );


Here is what is needed for your zone file:

material,hud_javelin_bg
material,hud_javelin_clu_on
material,hud_javelin_day_on
material,hud_javelin_dir_on
material,hud_javelin_lock_box
material,hud_javelin_lock_on
material,hud_javelin_night_on
material,hud_javelin_norocket_on
material,hud_javelin_rocket_on
material,hud_javelin_top_on
material,hud_objective_tank
material,hud_offscreenobjectivepointer
material,javelin_hud_target
material,javelin_hud_target_offscreen
material,javelin_overlay_grain

Presto! You can now blow up tanks in a very impressive manner.
[thumbs_up]
-Rob
Share |
voidsource
General Member
Since: May 5, 2007
Posts: 1513
Last: Sep 1, 2013
[view latest posts]
Level 8
Category: CoD4 SP Mapping
Posted: Sunday, Mar. 1, 2009 05:52 am
sounds cool thanks for the post.
Share |
jeannotvb
General Member
Since: Dec 8, 2007
Posts: 620
Last: Feb 1, 2010
[view latest posts]
Level 6
Im a fan of MODSonair
Category: CoD4 SP Mapping
Posted: Sunday, Mar. 1, 2009 05:06 pm
thanks i needed this
Share |
jeannotvb
General Member
Since: Dec 8, 2007
Posts: 620
Last: Feb 1, 2010
[view latest posts]
Level 6
Im a fan of MODSonair
Category: CoD4 SP Mapping
Posted: Sunday, Mar. 1, 2009 05:30 pm
undefined is not an entity with the exact script you posted.. i have the same targetname.
Share |
feilong80
General Member
Since: Aug 30, 2008
Posts: 14
Last: Mar 2, 2009
[view latest posts]
Level 1
Category: CoD4 SP Mapping
Posted: Sunday, Mar. 1, 2009 07:12 pm
are you using a tank of some type?

I am using the following entity with the following key value pairs:

classname script_vehicle
model vehicle_t72_tank
script_team axis
targetname auto64
vehicletype t72

Are you doing a precache on the vehicle itself? If not, you'll
need something like this in your global scripts section of your .gsc:

maps\_t72::main( "vehicle_t72_tank" );

In any event, the issue is most likely with tank = getent, as it is saying that your vehicle doesn't have a key value pair of targetname/auto64 (undefined meaning that you are trying to reference a field in your entity that doesn't exist).

Hope it works out for you.

-Rob

P.S.: Known issue: I've noticed when I blow up a tank with the javelin, it spawns an "extra" tank cannon and head. I think in the IW scripts they do some kind of delete function to make this look correct. Just an FYI.
Share |
jeannotvb
General Member
Since: Dec 8, 2007
Posts: 620
Last: Feb 1, 2010
[view latest posts]
Level 6
Im a fan of MODSonair
Category: CoD4 SP Mapping
Posted: Sunday, Mar. 1, 2009 07:15 pm
I double checked everything, target names, script_vehicle, the script, precaching.

Gives me the same crap.. :(
Share |
feilong80
General Member
Since: Aug 30, 2008
Posts: 14
Last: Mar 2, 2009
[view latest posts]
Level 1
Category: CoD4 SP Mapping
Posted: Sunday, Mar. 1, 2009 07:24 pm
Do you have this in your global scripts as well:

maps\_javelin::init();

And do you have this at the very top with your #includes:

#include maps\_vehicle;

That's the only thing I can see that could be holding you up.
After that, I'm afraid I can only tell you to look at the bog .gsc files to see how IW did it.

-Rob
Share |
jeannotvb
General Member
Since: Dec 8, 2007
Posts: 620
Last: Feb 1, 2010
[view latest posts]
Level 6
Im a fan of MODSonair
Category: CoD4 SP Mapping
Posted: Monday, Mar. 2, 2009 12:51 am
feilong80 writes...
Quote:
Do you have this in your global scripts as well:

maps\_javelin::init();

And do you have this at the very top with your #includes:

#include maps\_vehicle;

That's the only thing I can see that could be holding you up.
After that, I'm afraid I can only tell you to look at the bog .gsc files to see how IW did it.

-Rob


now i get 'type undefined is not an entity' on target_set( tank, OFFSET );
Share |
feilong80
General Member
Since: Aug 30, 2008
Posts: 14
Last: Mar 2, 2009
[view latest posts]
Level 1
Category: CoD4 SP Mapping
Posted: Monday, Mar. 2, 2009 01:29 am
Do you directly place your tank in the world or is it spawned in with a trigger? That could make a difference if the tank hasn't been spawned yet, it wouldn't see it as a legit actor.
Share |
babycop
General Member
Since: Feb 18, 2006
Posts: 488
Last: Feb 27, 2010
[view latest posts]
Level 5
Category: CoD4 SP Mapping
Posted: Monday, Mar. 2, 2009 02:10 am
before calling up the thread that sets up the javelin target, make sure you spawn your tank first. Put this in a seperate thread:


maps\_vehicle::create_vehicle_from_spawngroup_and_gopath( 1 );

also make sure your tank has the key: script_vehiclespawngroup
value: 1

change the number to your liking
Share |
Restricted Access Topic is Locked
Page
Next 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

»