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

Members Online

»
0 Active | 10 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 MP Mapping
CoD 2 mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page
subscribe
Author Topic: [Water Question (See Thru Walls)]
Plague
General Member
Since: Apr 21, 2006
Posts: 99
Last: Oct 10, 2007
[view latest posts]
Level 3
Category: CoD2 MP Mapping
Posted: Wednesday, Jun. 7, 2006 11:30 pm
aufklarer writes...
Quote:
about the hurt trigger, is it texture you apply on a brush? or is there some sripting to do? i have the same problem but with fire, i need ppl to get hurt when touching the fire...


In Radiant, create a brush around the location of where your fire is. With the brush still selected, go to your 2d window and right click. After right clicking choose trigger > hurt. You will notice that your brush is now textured using the "trig" texture. With the brush still selected, press N to bring up the entity window. Enter the following values:

key - dmg
value - % of health you want taken from palyer (ie - 5)

This should be all you need to do. The trigger should no cause damage to player.
Share |
Plague
General Member
Since: Apr 21, 2006
Posts: 99
Last: Oct 10, 2007
[view latest posts]
Level 3
Category: CoD2 MP Mapping
Posted: Friday, Jun. 16, 2006 02:23 pm
Well it seems that the script I posted above only works for one player at a time. So if more than one person is in the water it doesnt work right. Anyone have a solution to this?
Share |
Plague
General Member
Since: Apr 21, 2006
Posts: 99
Last: Oct 10, 2007
[view latest posts]
Level 3
Category: CoD2 MP Mapping
Posted: Friday, Jun. 16, 2006 02:24 pm
Well it seems the script I posted only works for one player at a time. So if more than one person is in the water it doesnt work right. Anyone have a solution to this?

main()
{
thread maps\mp\_load::main();
thread start();
}

start()
{
bottomtrig = getent("bottomtrig","targetname");
while(1)
{
bottomtrig waittill ("trigger",user);
user check_drown();
}
}

check_drown()
{
toptrig = getent("toptrig","targetname");
bottomtrig = getent("bottomtrig","targetname");

while(self isTouching(bottomtrig))
{
if(!self isTouching(toptrig))
{
self.health--; //Slowly Drown Player

if(self.health <= 0)
self suicide(); //This is because the game does not automatically kill those with 0 health.
}

wait 0.1;
}
}
Share |
FlesyM
General Member
Since: Jul 24, 2005
Posts: 399
Last: Jan 24, 2008
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Saturday, Jul. 15, 2006 12:41 am
sorry it's late ...
try this :

start()
{
bottomtrig = getent("bottomtrig","targetname");
while(1)
{
bottomtrig waittill ("trigger",user);
user thread check_drown();
}
}

that should work if more than one player is in the water.
Share |
Sweemanz
General Member
Since: Jun 18, 2006
Posts: 93
Last: Sep 20, 2006
[view latest posts]
Level 3
Category: CoD2 MP Mapping
Posted: Saturday, Jul. 15, 2006 05:45 am
Here is the complete script that flesym made for me

Code:
main()
{
  maps\mp\_load::main();
  thread start();
 

}

start()
{
bottomtrig = getent("bottomtrig","targetname");
while(1)
{
bottomtrig waittill ("trigger",user);
user check_drown();
}
}

check_drown()
{
toptrig = getent("toptrig","targetname");
bottomtrig = getent("bottomtrig","targetname");

while(self isTouching(bottomtrig))
{
if(!self isTouching(toptrig))
{
self.health--; //Slowly Drown Player

if(self.health <= 0)
self suicide(); //This is because the game does not automatically kill those with 0 health.
}

wait 0.1; 
}
}


Note: You can only have one trigger for each targetname
such as bottomtrig or toptrig
if u want more u will have to edit the script
Share |
Restricted Access Topic is Locked
Page
Previous Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 MP Mapping

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

»