Welcome New User Home | Forums | Register | Login | Larger Font
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
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 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
rabidsqurl [Forum]
KillerCrazzy [Today]
Sgt.Jack [Galle]

3 Members and 14 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Friday, Jul. 18th
MODSonair Episode 136
Thursday, Jul. 17th
E3 2008: Daily Recap
Monday, Jul. 14th
E3 2008 Latest News
Sunday, Jul. 13th
MODSonair 136 LIVE
Saturday, Jul. 12th
Brothers in Arms: HH - Baptism of Fire Walkthrough
Latest Poll
Want a MODSonline Wiki for various games?
I think a Wiki would be a great addition to MODSonline. 75.81%
I could see a benefit of a Wiki. 4.84%
I think it would take away from the community. 4.03%
Wiki sites are never good. 3.23%
Wiki... isn't that Buck Roger's robot slave? 12.1%
Read More...
10 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
sp and gsc files
CoD 4 Single Pla.. Posts: (4) Views: (40) by rabidsqurl
mp tank fire script problem sound error
CoD 2 Level Desi.. Posts: (7) Views: (39) by newtonboy
making oldschool wisp and ammo pickups ?
CoD 4 Level Desi.. Posts: (3) Views: (24) by COLMAC
I need maps for CODUO-BASE ASSAULT
CoD and CoDUO Cu.. Posts: (1) Views: (10) by milang5
Art of War Central Half-Life 2 Mods for Dummies
Typhoon Servers
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.
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
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: 686
Last: Jul 4, 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: 686
Last: Jul 4, 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: 11034
Last: Jul 19, 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.com can be found News.php.
Intergi
Partners
The Firing Box
modbase.be
Frag Universe
Websites4Clans
My Topsites List
Battle for Europe COD2
Call of Duty Headquarters
XoXide
Ask About
Advertising
Friends
After Life Gaming
ModTheater
Volcano
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 136
MODSonair Episode 135
MODSonair Episode 134
MODSonair Episode 133
MODSonair Special CoD:WW Episode
Next Show
The next MODSonair show will air LIVE on:
07/20/2008 11:00 EDT

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