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

Members Online

»
0 Active | 32 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 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 subscribe
Author Topic: player scoring and
ponder.stibbons
General Member
Since: Apr 26, 2006
Posts: 19
Last: Jun 28, 2006
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Tuesday, May. 2, 2006 08:18 am
player scoring and damaging/destroying objects

possibly someone can help me with one or two lines of code - i'm not all new to this.

currently im scriptin a self-designed mp_map wich has a radio that can be turned on by the player.
the switching works but i would like to switch it off by "destroying" it.
ie - add a certain amount of damage by shooting at it or throwing a grenade.

the second part of my problem is:
how do i determin which player switches the radio on?

why? i want to grant the player that switches the radio on or destroys it some kind of bonus. maybe 5 kills or the player that turns it on heals much faster as long as the radio works.
a bit like "headquarters" but for deathmatch.
i didn't find something usable (i.e. "i understand") in the .iwd-files that come with CoD2 nor have i found someone who has done something like that in the tutorials or CoD/CoDUO-Forums
[sad]

so in short:
the current player is referenced:
........

something is damaged/destroyed by:
........


i don't need the radio to dissapear or change looks - the next player should be allowed to switch it on again ...


edited on May. 2, 2006 04:18 am by ponder.stibbons
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD2 Scripting
Posted: Tuesday, May. 2, 2006 12:11 pm
Damage: Use a trigger_damage, in the enitity window you can set how much damage must be dealt before it is activated.

If you use a trigger to turn the radio on, you can use this:
trig waittill ("trigger",person);

Then person becomes the one who activated the trigger.

The same might be done for the trigger damage when destroying it (I'm not sure if that works though).
Share |
ponder.stibbons
General Member
Since: Apr 26, 2006
Posts: 19
Last: Jun 28, 2006
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Thursday, May. 4, 2006 05:44 am
1024 thx!

works fine though i still have not figured out how to update the player-hud. should be a single line that is called, when a player spawns...

anyway - the score is raised and the radio can be "destroyed" again

that's all i needed![cool]

now for the next prob
[drink]

Share |
tuborg
General Member
Since: Apr 26, 2006
Posts: 9
Last: May 23, 2006
[view latest posts]
Level 0
Category: CoD2 Scripting
Posted: Wednesday, May. 10, 2006 11:25 pm
please write for me descriptive, how make HQ map.
thx
Share |
ponder.stibbons
General Member
Since: Apr 26, 2006
Posts: 19
Last: Jun 28, 2006
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Thursday, May. 11, 2006 07:36 am
weellll....

i have not done a REAL hq-map so far but that should not be so hard.

i don't know how to manipulate the HUD to show the position of the radio as in real HQ mode and how to make a progress-bar for setting up and destroying the HQ.

apart from that it should not be so hard to do:
look into my scripts, they are quite well-commented
(http://www.andees-arca.de/pacmanfever.zip)

for a real HQ you will need a trigger around the radio that registers how many players of what kind(allies/axis) are around the radio.

within the .iwd files there is a folder maps\mp\gametypes which contains a file named "hq.gsc" that should do everything you need
[cool]
it even has a SHORT readme in front to tell you how to make your map a REAL multiplayer-hq map.

simply unpack the .iwd files with 7-zip or filzip or even winzip...

don't hesistate to ask me again![wave]
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD2 Scripting
Posted: Thursday, May. 11, 2006 09:30 am
Tuborg, don't hijack other peoples threads.

As for HQ, HQ is really simple.

Just open one of the stock mp .gsc files for a map (mp_carentan.gsc for instance) and take a look around in there.
HQ used TDM spawnpoints and the radios are added through the scripting.
Share |
Restricted Access Topic is Locked 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

»