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

Members Online

»
0 Active | 51 Guests
Online:

LATEST FORUM THREADS

»
run artillery on maps
CoD+UO Map + Mod Releases
Call of DutyŽ: WWII
CoD WW2 General

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: rpg projectile code
Samuel033
General Member
Since: Dec 10, 2009
Posts: 484
Last: Dec 25, 2015
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Friday, Jan. 22, 2010 03:48 pm
Does anybody know in mp which files/functions the game handles the firing of an rpg? More specifically where it creates the projectile entity and gives it the vector to aim at? I've found the various places where new c4/claymore/grenades are spawned and handled but not rpgs.

Thx
Share |
OLD_MAN_WITH_GUN
General Member
Since: May 13, 2006
Posts: 754
Last: Jan 22, 2010
[view latest posts]
Level 7
Category: CoD4 Scripting
Posted: Friday, Jan. 22, 2010 06:44 pm
It's not handled by a script. It's all done in the weaponfile.
Share |
Samuel033
General Member
Since: Dec 10, 2009
Posts: 484
Last: Dec 25, 2015
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Friday, Jan. 22, 2010 07:19 pm
Isnt the rocket projectile created from its model as referred to by the launcher weapon file to be placed in-game? The usual procedure being to take the position and orientation of the player for its own origin and firing direction? The smoke fx must follow it as well. My thinking is that somewhere along the way the projectile model and fx are attached to an entity. At the moment its the entity name of the projectile that I am searching for.
Share |
Xylozi
General Member
Since: Jul 12, 2008
Posts: 218
Last: Mar 1, 2012
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Saturday, Jan. 23, 2010 04:58 am
The entity reference is: "rocket" | "classname"
Share |
Samuel033
General Member
Since: Dec 10, 2009
Posts: 484
Last: Dec 25, 2015
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Saturday, Jan. 23, 2010 11:52 am
Checked my emails this morning and that was just the thing I was looking for, thank you. Last thing I needed, plugged it in, and works like a charm. Tried to get the entity via reference but it never worked... always 'undefined'.

Now I get to go back and debug. [crazy]
Share |
Xylozi
General Member
Since: Jul 12, 2008
Posts: 218
Last: Mar 1, 2012
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Saturday, Jan. 23, 2010 05:03 pm
Well if there are no rockets in the air, then there will be no references for it.
Share |
Samuel033
General Member
Since: Dec 10, 2009
Posts: 484
Last: Dec 25, 2015
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Sunday, Jan. 24, 2010 11:20 am
Yes. I had the right method of getting the entity but the wrong keys to put into the function call, so they never existed.

One thing I am curious about. Is the 'rocket' keyword limited to the firing player only when used in this way? Say if three people fired their rockets at the same time?
Share |
_INSANE_
General Member
Since: Nov 6, 2008
Posts: 352
Last: Jul 10, 2011
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Sunday, Jan. 24, 2010 01:57 pm
getEntArray("rocket", "classname"); Will get every rocket that exists at that point in time.
Share |
Samuel033
General Member
Since: Dec 10, 2009
Posts: 484
Last: Dec 25, 2015
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Sunday, Jan. 24, 2010 05:12 pm
Its all getting a bit more complicated than I thought. But isnt it always with programming? [lol]

Thank you that function instead should work great. For testing purposes I altered an rpg and changed its settings into a seeker. It works very well but just for kicks I fired twice in a row. Of course the second didnt track and caused an error. Heh.
Share |
Samuel033
General Member
Since: Dec 10, 2009
Posts: 484
Last: Dec 25, 2015
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Tuesday, Jan. 26, 2010 11:25 pm
It worked. For testing purposes its kinda funny watching 5-6 missiles circling and trying to home in on the chopper.

One interesting problem is that a missile that has a locked target ( missile_settarget() ) looks like it will go no higher than the chopper. I suppose thats a limitation of the function and it resets any upward momentum down to the chopper height. When firing straight up without a lock the rocket goes up like... well... a rocket. [jumping]
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

»