MODSonline
  Welcome Guest to MODSonline Home | Forums | Register | Login
Main-Menu
Home
Login
Register
Add Download
Add News
Add Tutorial *
Forums

Advertise
Affiliate Store US *
Affiliate Store UK *
Affiliate Store CA *
Angry Letter Generator
Avatar Upload
Calendar of Games
Contact
Downloads
FAQs
Forums
Member List
Member Projects
News
News Grabber *
Policy
Polls
Private Messages
Reviews
Screenshot Gallery
Search
Servers - Game
Store - Shirts *
Subscribe
Topics
Tutorials
Weblinks
Wiki *
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 Mapping
CoDWW Mapping
CoD FAQs
HL2 Mapping
HL2 FAQs
SOF1 Mapping
Crysis Mapping
Q4 Mapping
Doom 3 Mapping
Doom 3 FAQs
UT2K3 Mapping
SOF2 Mapping
SOF2 FAQs

Lightray Modeling
General Modeling
General Modding
Adobe Photoshop
Common Mapping Errors

Readme.txt Generator
Members-Online
Gumpi [Today]
Zestycookie [Forum]
Puncster [Banne]
Myst3ry [Downl]
strambachm... [Downl]
COLMAC [Forum]
Morphisnb [Forum]
jj48 [Downl]
Welshy [Today]
cz_squishy [Forum]
Kingmarzo [Forum]

11 Members and 23 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Saturday, Nov. 22nd
CoD:WW Video Tutorial is up!
Friday, Nov. 21st
MODSonair Episode 154
Thursday, Nov. 20th
Call Of Duty World At War - Mod Tools
Wednesday, Nov. 19th
Half-Life 1 $0.98
Sunday, Nov. 16th
MODSonair 154 Live
Latest Poll
Would you pay for mod tools?
I would pay a one time fee for mod tools for my favorite title 8.42%
I would pay a monthly/yearly subsrciption fee for mod tools for my favorite title 0.5%
I already paid for the game - Tools should come bundled because I am just fixing what the developers broke 67.82%
100% definitely NOT! 19.31%
I haven't seen a game yet that wasn't 100% perfect when the developers released it 2.48%
Games are the devil! 1.49%
Read More...
16 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
Plz Help Radiant Error
CoD:WW Level Des.. Posts: (3) Views: (38) by COLMAC
uh prefabs?
CoD:WW Level Des.. Posts: (14) Views: (163) by CoDLiNK
Simple Problem
CoD:WW General G.. Posts: (2) Views: (12) by NovemberDobby
Cod4 Loadscreen problem , what a suprise
CoD 4 Level Desi.. Posts: (2) Views: (25) by COLMAC
Art of War Central Quake 4 Mods for Dummies
CoDWW Download
Forums
MODSonline.com 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, rEdrUmMDK, Foxhound, Wyatt_Earp, Rasta, StrYdeR, The_Caretaker, Cypher2004, batistablr, Welshy
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access
Page
Next Page
subscribe
Author Topic: injuries only ---> enemies-players ???
alfabigo
General Member
Since: Jan 16, 2008
Posts: 50
Last: Jul 8, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Sunday, May. 11, 2008 12:17 am
Hi,
I have 1 "trigger_use_touch" , which I active an bomb .

this bomb explode and causing injuries. But i want only . it cause damage to enemies-players . I don't wish cause injuries to my friends-players.

how i do it ?

this is part of script:

Code:


thanks in advance.

PD:excuse my language. I don't speak English
playername
Preferred Member
Since: Aug 24, 2006
Posts: 696
Last: Nov 22, 2008
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Sunday, May. 11, 2008 01:13 am
Ok, to do this you have to add some to your script. Let me see if there is a easy way to do this :/

edited on May. 11, 2008 01:15 am by playername
Few tips for coding.
1. Keep the script as short as possable.
2. Don't use comments unless you HAVE to point something out.
3. Don't over complicate the script, keep it orgainized and easy to read.

These help you find simple errors and makes it easy to make changes.
playername
Preferred Member
Since: Aug 24, 2006
Posts: 696
Last: Nov 22, 2008
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Sunday, May. 11, 2008 01:34 am
There is one thing you need to add to your map. It is a trigger_multiple in the area around the bomb. What the script does is gets all of the people in the map, checks to see if they are touching the trigger, and if they are of the player's enemy, dead.

****WHAT TO ADD****
1. MAP: Make a trigger_multiple around the area you want the enemy to die in. Give it a targetname of kill_trig. Don't make it to big.
2. SCRIPT: Change to the following code. If you wish, you can take out the comments i have added.


Code:


NOTE: This is not tested. Post errors. Anyone, please fix!
Few tips for coding.
1. Keep the script as short as possable.
2. Don't use comments unless you HAVE to point something out.
3. Don't over complicate the script, keep it orgainized and easy to read.

These help you find simple errors and makes it easy to make changes.
alfabigo
General Member
Since: Jan 16, 2008
Posts: 50
Last: Jul 8, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Sunday, May. 11, 2008 01:57 am
ok thanks , I will study your script ,then , I will do other questions.

regards[thumbs_up]
alfabigo
General Member
Since: Jan 16, 2008
Posts: 50
Last: Jul 8, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Sunday, May. 11, 2008 02:56 am
I did the following map . using your script


Code:


I get the following ERROR :


Quote:

******* script compile error *******
uninitialised variable 'player': (file 'maps/mp/_matarsoloenemigo.gsc', line 29)
player suicide(); //kill the player
*
************************************


what happen ???
The_Caretaker
Preferred Member
Since: Jun 8, 2004
Posts: 11559
Last: Oct 4, 2008
[view latest posts]
Level 10
Forum Moderator
Category: CoD2 Scripting
Posted: Sunday, May. 11, 2008 03:02 am

Code:


should be


Code:
alfabigo
General Member
Since: Jan 16, 2008
Posts: 50
Last: Jul 8, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Sunday, May. 11, 2008 03:06 am
thanks. you're right .-
alfabigo
General Member
Since: Jan 16, 2008
Posts: 50
Last: Jul 8, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Sunday, May. 11, 2008 05:43 am
yeah ! I found another way....It appears more simple. I post it tomorrow.

Unfortunately for testing, we must see us dead.

[sleeping]
alfabigo
General Member
Since: Jan 16, 2008
Posts: 50
Last: Jul 8, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Sunday, May. 11, 2008 09:12 pm
I have here what I promised.
with the help of the script of playername. I did mine.
I don't want to use the function " suicide()".
I was anxious to use the function "radiusDamage(,,,)" . so , I search in my folder :
C: \ Program Files \ Activision \ Call of Duty 2 \ Docs \ ScriptFunctions

I found the following function:
"setplayerignoreradiusdamage (true);"

so , without using a "Trigger_multiple", this is my script:

Code:


another way: this is another code more realistic.


Code:


for testing, do:

script-1

Quote:

setplayerignoreradiusdamage(false); ---> true

script-2

Quote:

!= ---> ==


---------------------------------------------

this works in "radiant". I was an "lonely player " . I can not see enemies injured .I hope This should work on a server.

what do you think my script?

good luck ! [wink]


alfabigo
General Member
Since: Jan 16, 2008
Posts: 50
Last: Jul 8, 2008
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Sunday, May. 11, 2008 10:22 pm
mmmmmmmmmmmmmm....

seems that code 2 does not work as I think.
since; generalizes the variable " maxDmg " for everyone equally.

-------------------

Also, I seriously doubt another code....

help !![banghead]
Restricted Access Restricted Access
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting
All logos and trademarks and information in this site are property of MODSonline LLC © 2008.
The comments are property of their posters.
RSS news feeds for MODSonline can be found News.php.
MODSonline Subscriptions
Partners
The Firing Box
Call of Duty Headquarters
CODAddicts - Call of Duty News & Downloads
Battle for Europe COD2
XoXide
modbase.be
Frag Universe
Ask About
Advertising
Friends
Great Gamer
CoD 4 Base
MODS Reloaded
Ask About
Advertising
Link to Us
MODSonair
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
MODSonair Releases
MODSonair Episode 154
MODSonair Episode 153
MODSonair Episode 152
MODSonair Episode 151
Video server move
Next Show
The next MODSonair show will air LIVE on:
11/23/2008 12:00 EST

Time remaining:
Copyright © 2008 MODSonline
Tresware Content Management System Copyright © 2008 Tresware
Website Designed and Hosted   Tresware