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

Members Online

»
0 Active | 9 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 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 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Sentry Gun
stalph96
General Member
Since: Oct 19, 2011
Posts: 4
Last: Oct 21, 2011
[view latest posts]
Level 0
Category: CoD2 Scripting
Posted: Wednesday, Oct. 19, 2011 02:10 pm
Hello,

I am Stalph, and I am working on a modification for Call of Duty 2.
I only need one more thing to complete my mod's v1 version.

The thing what I need, is a "Sentry Gun", what I can place in somewhere, and It will shoot at ENEMIES, and will kill them AUTOMATICALLY. I have the fx,sound,model,anim to the sentry gun, i only need some script help, because i don't have any idea to make the Sentry's script.
I have already made the script of "Predator Missile" "Atom bob" "AC 130" (help from extreme mod), money and account system, but i can't make the sentry script.

Can Someone help me?

Thanks,
Stalph
Share |
tHMatt
General Member
Since: Sep 11, 2007
Posts: 473
Last: Mar 20, 2013
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Wednesday, Oct. 19, 2011 06:19 pm
Do you mean something like this in my video?


http://www.xfire.com/video/2474ef/
Share |
stalph96
General Member
Since: Oct 19, 2011
Posts: 4
Last: Oct 21, 2011
[view latest posts]
Level 0
Category: CoD2 Scripting
Posted: Thursday, Oct. 20, 2011 01:53 pm
Yes. It's very great. Did you make this? Very nice work!
I need a sentry gun like that, too.
Can you help me please?

Please add me to x-fire to contact faster.

my x-fire: stalph96

Thank you,
Stalph
Share |
tHMatt
General Member
Since: Sep 11, 2007
Posts: 473
Last: Mar 20, 2013
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Friday, Oct. 21, 2011 12:16 am
Have you not started making your own? I'm not just giving you my code lol.. but i'll help you along.
Share |
stalph96
General Member
Since: Oct 19, 2011
Posts: 4
Last: Oct 21, 2011
[view latest posts]
Level 0
Category: CoD2 Scripting
Posted: Friday, Oct. 21, 2011 01:22 pm
Yes i have already started it, but i can't finish It, because i don't know how to tell him to shoot another players (only enemies).

I only need the shooting part of the code.
So i can place the sentry, and i can remove it after 2 mins, or something like that, but don't know how to make It to shoot enemies.

Thanks,
Stalph
Share |
liltc64
General Member
Since: Feb 12, 2007
Posts: 906
Last: Oct 22, 2012
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Friday, Oct. 21, 2011 05:18 pm
just check if the player is in the sentry gun radius and if so play damage to the player till he gets out of the trigger and play a shooting effect from the sentry gun so it looks like the sentry gun is shooting the player.
Share |
csocsi96
General Member
Since: Aug 9, 2010
Posts: 75
Last: Aug 24, 2014
[view latest posts]
Level 3
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Friday, Oct. 21, 2011 07:37 pm
i made that, but what about the walls?

When i place the sentry, it shoots threw the wall.
How to fix it?
Share |
liltc64
General Member
Since: Feb 12, 2007
Posts: 906
Last: Oct 22, 2012
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Friday, Oct. 21, 2011 08:51 pm
never made a sentry gun before but im thinking if you have a bullettrace from the player to the sentry model and check its fraction and if its not = 1 then the player or sentry or w.e is behind a wall so dont do damage to the player and stop shooting.
Share |
csocsi96
General Member
Since: Aug 9, 2010
Posts: 75
Last: Aug 24, 2014
[view latest posts]
Level 3
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Saturday, Oct. 22, 2011 07:18 am
I know i have to make trace=bullettrace, but don't know how to make it.
What to write, so i'm in trouble.

And I know i have to calculate vectors but don't know how.
Share |
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1437
Last: Jul 3, 2017
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Saturday, Oct. 22, 2011 12:33 pm
Code:

trace = bulletTrace(<start origin>, <end origin>, <hitPlayers true/false>, <ignoreEntity>);


The only vector calculation is working out the angle the sentry should be to face the player, which is just 1 line of code

Code:

sentry.angles = vectortoangles(<target origin> - <start origin>);
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 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

»